|
@@ -185,6 +185,9 @@ uses
|
|
Math, DateUtils
|
|
Math, DateUtils
|
|
{$IFDEF UNIX}
|
|
{$IFDEF UNIX}
|
|
, BaseUnix, Unix, DCUnix
|
|
, BaseUnix, Unix, DCUnix
|
|
|
|
+{$ENDIF}
|
|
|
|
+{$IFDEF DARWIN}
|
|
|
|
+ , uDarwinFileUtil
|
|
{$ENDIF}
|
|
{$ENDIF}
|
|
;
|
|
;
|
|
|
|
|
|
@@ -640,7 +643,29 @@ var
|
|
if not Assigned(TargetFileStream) and (log_errors in gLogOptions) then
|
|
if not Assigned(TargetFileStream) and (log_errors in gLogOptions) then
|
|
logWrite(FOperationThread, rsMsgLogError + GetMsgByMode + ': ' + TargetFileName, lmtError, True);
|
|
logWrite(FOperationThread, rsMsgLogError + GetMsgByMode + ': ' + TargetFileName, lmtError, True);
|
|
end;
|
|
end;
|
|
|
|
+
|
|
|
|
+ procedure doUpdate;
|
|
|
|
+ begin
|
|
|
|
+ with FStatistics do
|
|
|
|
+ begin
|
|
|
|
+ CurrentFileDoneBytes := CurrentFileDoneBytes + BytesRead;
|
|
|
|
+ DoneBytes := DoneBytes + BytesRead;
|
|
|
|
+ UpdateStatistics(FStatistics);
|
|
|
|
+ end;
|
|
|
|
+ end;
|
|
|
|
+
|
|
begin
|
|
begin
|
|
|
|
+{$IFDEF DARWIN}
|
|
|
|
+ if Mode = fsohcmDefault then begin
|
|
|
|
+ Result:= TDarwinFileUtil.cloneFile( SourceFile.FullPath, TargetFileName );
|
|
|
|
+ if Result then begin
|
|
|
|
+ BytesRead:= SourceFile.Size;
|
|
|
|
+ doUpdate;
|
|
|
|
+ Exit;
|
|
|
|
+ end;
|
|
|
|
+ end;
|
|
|
|
+{$ENDIF}
|
|
|
|
+
|
|
Result := False;
|
|
Result := False;
|
|
|
|
|
|
{ Check disk free space }
|
|
{ Check disk free space }
|
|
@@ -907,13 +932,7 @@ begin
|
|
end;
|
|
end;
|
|
until not bRetryRead;
|
|
until not bRetryRead;
|
|
|
|
|
|
- with FStatistics do
|
|
|
|
- begin
|
|
|
|
- CurrentFileDoneBytes := CurrentFileDoneBytes + BytesRead;
|
|
|
|
- DoneBytes := DoneBytes + BytesRead;
|
|
|
|
-
|
|
|
|
- UpdateStatistics(FStatistics);
|
|
|
|
- end;
|
|
|
|
|
|
+ doUpdate;
|
|
|
|
|
|
AppProcessMessages;
|
|
AppProcessMessages;
|
|
CheckOperationState; // check pause and stop
|
|
CheckOperationState; // check pause and stop
|