mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 18:31:11 +02:00
* open chm in nonexclusive mode. Could cause problems on Windows Vista where filelocks last even longer after closing.
git-svn-id: trunk@13599 -
This commit is contained in:
parent
106c0673c0
commit
1399b7f8fb
@ -76,7 +76,7 @@ end;
|
|||||||
Constructor TChmWrapper.Create(name:string);
|
Constructor TChmWrapper.Create(name:string);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
ffs:=Classes.TFileStream.create(name,fmOpenRead);
|
ffs:=Classes.TFileStream.create(name,fmOpenRead or fmsharedenynone);
|
||||||
fchmr:=TChmReader.Create(ffs,True); // owns ffs
|
fchmr:=TChmReader.Create(ffs,True); // owns ffs
|
||||||
findex:=nil;
|
findex:=nil;
|
||||||
if not fchmr.isvalidfile then
|
if not fchmr.isvalidfile then
|
||||||
@ -235,8 +235,10 @@ begin
|
|||||||
freeandnil(ftopic);
|
freeandnil(ftopic);
|
||||||
freeandnil(findex);
|
freeandnil(findex);
|
||||||
freeandnil(fchmr);
|
freeandnil(fchmr);
|
||||||
|
{$ifdef wdebug}
|
||||||
|
debugmessageS({$i %file%},'TCHMWrapper: destroying ',{$i %line%},'1',0,0);
|
||||||
|
{$endif}
|
||||||
|
|
||||||
end;
|
end;
|
||||||
// m:=r.getobject(r.indexfile);
|
|
||||||
// siteindex.loadfromStream(m);
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user