DEADSOFTWARE

sfs: do not lock files at all
authorKetmar Dark <ketmar@ketmar.no-ip.org>
Fri, 15 Apr 2016 11:44:47 +0000 (14:44 +0300)
committerKetmar Dark <ketmar@ketmar.no-ip.org>
Fri, 15 Apr 2016 11:47:42 +0000 (14:47 +0300)
src/sfs/sfs.pas
src/sfs/sfsPlainFS.pas

index eaabb964a9e0bb9f55a8f952deabbd9ecf29b8fc..7e466ce39701dd7ca88471e4e86171ce27413f99 100644 (file)
@@ -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;
index 84409bdc588f801f6b316eafd7cb83381bdb2afa..c46d83f8fee1b2d9df4bc74cb143795155426049 100644 (file)
@@ -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;