From: Ketmar Dark Date: Fri, 15 Apr 2016 11:44:47 +0000 (+0300) Subject: sfs: do not lock files at all X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=fcfc03f557704d4c1f148624b261eca84d54a422;p=d2df-sdl.git sfs: do not lock files at all --- diff --git a/src/sfs/sfs.pas b/src/sfs/sfs.pas index eaabb96..7e466ce 100644 --- a/src/sfs/sfs.pas +++ b/src/sfs/sfs.pas @@ -1121,7 +1121,7 @@ begin end; if ds <> nil then st := ds - else st := TFileStream.Create(fn, fmOpenRead or fmShareDenyWrite); + else st := TFileStream.Create(fn, fmOpenRead or {fmShareDenyWrite}fmShareDenyNone); st.Position := 0; volumes.Pack(); @@ -1269,7 +1269,7 @@ var cdir := SFSReplacePathDelims(SFSExpandDirName(cdir), '/'); if cdir[Length(cdir)] <> '/' then cdir := cdir+'/'; try - result := TFileStream.Create(cdir+dfn, fmOpenRead or fmShareDenyWrite); + result := TFileStream.Create(cdir+dfn, fmOpenRead or {fmShareDenyWrite}fmShareDenyNone); exit; except end; diff --git a/src/sfs/sfsPlainFS.pas b/src/sfs/sfsPlainFS.pas index 84409bd..c46d83f 100644 --- a/src/sfs/sfsPlainFS.pas +++ b/src/sfs/sfsPlainFS.pas @@ -650,7 +650,7 @@ begin kill := false; try try - fs := TFileStream.Create(fFileName, fmOpenRead or fmShareDenyWrite); + fs := TFileStream.Create(fFileName, fmOpenRead or {fmShareDenyWrite}fmShareDenyNone); kill := true; except fs := fFileStream; @@ -668,7 +668,7 @@ begin kill := false; try try - fs := TFileStream.Create(fFileName, fmOpenRead or fmShareDenyWrite); + fs := TFileStream.Create(fFileName, fmOpenRead or {fmShareDenyWrite}fmShareDenyNone); kill := true; except fs := fFileStream;