瀏覽代碼

FIX: Verify after copy under macOS

Alexander Koblov 1 年之前
父節點
當前提交
2e0343433d
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      components/doublecmd/dcosutils.pas

+ 2 - 2
components/doublecmd/dcosutils.pas

@@ -874,7 +874,7 @@ begin
   begin
   begin
     FileCloseOnExec(Result);
     FileCloseOnExec(Result);
 {$IF DEFINED(DARWIN)}
 {$IF DEFINED(DARWIN)}
-    if (Mode and fmOpenDirect <> 0) then
+    if (Mode and (fmOpenSync or fmOpenDirect) <> 0) then
     begin
     begin
       if (FpFcntl(Result, F_NOCACHE, 1) = -1) then
       if (FpFcntl(Result, F_NOCACHE, 1) = -1) then
       begin
       begin
@@ -915,7 +915,7 @@ begin
   begin
   begin
     FileCloseOnExec(Result);
     FileCloseOnExec(Result);
 {$IF DEFINED(DARWIN)}
 {$IF DEFINED(DARWIN)}
-    if (Mode and fmOpenDirect <> 0) then
+    if (Mode and (fmOpenSync or fmOpenDirect) <> 0) then
     begin
     begin
       if (FpFcntl(Result, F_NOCACHE, 1) = -1) then
       if (FpFcntl(Result, F_NOCACHE, 1) = -1) then
       begin
       begin