pastojs: use fmShareDenyNone when writing js

This commit is contained in:
mattias 2020-12-19 11:46:30 +00:00
parent 8aed6ac7e4
commit f211913978

View File

@ -1697,6 +1697,7 @@ var
{$IFDEF FPC}
i: Integer;
l: TMaxPrecInt;
FS: TFileStream;
{$ENDIF}
begin
if Assigned(OnWriteFile) then
@ -1726,7 +1727,12 @@ begin
end;
{$ELSE}
try
ms.SaveToFile(Filename);
FS:=TFileStream.Create (FileName,fmCreate or fmShareDenyNone);
Try
ms.SaveToStream(FS);
finally
FS.free;
end;
except
on E: Exception do begin
i:=GetLastOSError;