* Do not lock output files

This commit is contained in:
Michaël Van Canneyt 2024-01-28 11:22:10 +01:00
parent c3339e9a51
commit 2e1c7cbc10

View File

@ -585,7 +585,8 @@ begin
phtInput: Result:=FileOpen(aFileName,fmOpenRead); phtInput: Result:=FileOpen(aFileName,fmOpenRead);
phtOutput, phtOutput,
phtError: if FileExists(aFileName) then phtError: if FileExists(aFileName) then
Result:=FileOpen(aFileName,fmOpenWrite or fmShareDenyNone) // No locking for existing file. (e.g. /dev/null cannot be locked)
Result:=FileOpen(aFileName,fmOpenWrite or fmShareNoLocking)
else else
Result:=FileCreate(aFileName,fmShareDenyNone,DefaultRights) Result:=FileCreate(aFileName,fmShareDenyNone,DefaultRights)
end; end;