summaryrefslogtreecommitdiff
path: root/UCore.pas
diff options
context:
space:
mode:
Diffstat (limited to 'UCore.pas')
-rw-r--r--UCore.pas11
1 files changed, 6 insertions, 5 deletions
diff --git a/UCore.pas b/UCore.pas
index cc298ea..447392a 100644
--- a/UCore.pas
+++ b/UCore.pas
@@ -120,7 +120,7 @@ type TWorkerThread = class(TThread)
end;
TOpenDirThread = class(TThread)
- private
+ protected
procedure Execute; override;
public
AEngine: TPanelEngine;
@@ -410,7 +410,6 @@ function ChangeDir(Engine: TPanelEngine; Path: string; var SelItem: string; cons
var APath: string;
Error : integer;
begin
- Result := 1;
try
APath := Engine.Path;
if Path = '..' then GoUp(APath)
@@ -585,6 +584,7 @@ end;
// Return False to break the process
function CopyFilesWorker_ProgressFunc(Sender: Pointer; BytesDone: Int64): boolean; cdecl;
begin
+ Result := True;
// DebugMsg(['*** CopyFilesWorker: ProgressFunc called (Sender=', QWord(Sender), ', BytesDone=', BytesDone, ')']);
try
if Assigned(Sender) and (TObject(Sender) is TWorkerThread) then
@@ -726,6 +726,7 @@ var DefResponse: integer; // Global variables for this function
function LocalCopyFile(SourceFile, DestFile: string; Append: boolean): boolean;
var DataSrc, DataDest: PDataItemSL;
begin
+ Result := False;
try
with SenderThread do begin
if ((SrcEngine is TLocalTreeEngine) and (DestEngine is TLocalTreeEngine)) or
@@ -774,10 +775,10 @@ var DefResponse: integer; // Global variables for this function
function DoOperation(AFileRec: PDataItemSL; const Dst: string; var ErrorKind: integer; const Append: boolean): integer;
begin
- try
ErrorKind := 0;
Result := 0;
- with SenderThread do
+ try
+ with SenderThread do
with AFileRec^ do begin
if IsLnk then begin
// Explicit copy the file
@@ -2698,8 +2699,8 @@ var Handle : PDIR;
StatBuf : Pstat64;
Buf : PChar;
begin
+ Result := True;
try
- Result := True;
APath := IncludeTrailingPathDelimiter(APath);
Handle := opendir(PChar(APath));
if not Assigned(Handle) then begin