summaryrefslogtreecommitdiff
path: root/UCore.pas
diff options
context:
space:
mode:
Diffstat (limited to 'UCore.pas')
-rw-r--r--UCore.pas42
1 files changed, 36 insertions, 6 deletions
diff --git a/UCore.pas b/UCore.pas
index 50f705f..5481bf9 100644
--- a/UCore.pas
+++ b/UCore.pas
@@ -682,6 +682,7 @@ var i: longint;
Fr: Single;
Response: integer;
DeleteAll, SkipToNext: boolean;
+ x: PDataItemSL;
begin
SkipAll := False;
@@ -695,12 +696,18 @@ begin
if (not UpDir) and Selected then
if IsDir and (not IsLnk)
then Engine.FillDirFiles(CurrPath + String(FName), AList, 1)
- else AList.Add(Engine.GetFileInfoSL(CurrPath + String(FName)));
+ else begin
+ x := Engine.GetFileInfoSL(CurrPath + String(FName));
+ if x <> nil then AList.Add(x);
+ end;
if (AList.Count = 0) and Assigned(SelectedItem) and (not SelectedItem^.UpDir) then
with SelectedItem^ do
if IsDir and (not IsLnk)
then Engine.FillDirFiles(CurrPath + String(FName), AList, 1)
- else AList.Add(Engine.GetFileInfoSL(CurrPath + String(FName)));
+ else begin
+ x := Engine.GetFileInfoSL(CurrPath + String(FName));
+ if x <> nil then AList.Add(x);
+ end;
if Engine.ChangeDir(CurrPath) <> 0 then DebugMsg(['*** WARNING: Cannot change to the origin location, strange behaviour might occur.']);
Engine.ExplicitChDir('/');
@@ -1089,6 +1096,11 @@ var DefResponse: integer; // Global variables for this function
then begin
Response := DefResponse;
Item := DestEngine.GetFileInfoSL(NewFilePath);
+ if Item = nil then begin
+ DebugMsg(['Something went terribly wrong during copy - Item := DestEngine.GetFileInfoSL(NewFilePath) == NULL!']);
+ Result := False;
+ Exit;
+ end;
if Response = 0 then begin
case ConfSizeFormat of
5: InfoLabelFormat := '%s, %s';
@@ -1989,6 +2001,7 @@ var i: longint;
AList: TList;
CurrPath: string;
Fr: Single;
+ x: PDataItemSL;
begin
SkipAll := False;
with SenderThread do begin
@@ -2001,12 +2014,18 @@ begin
if (not UpDir) and Selected then
if IsDir and (not IsLnk) and ParamBool1
then Engine.FillDirFiles(CurrPath + String(FName), AList, 1)
- else AList.Add(Engine.GetFileInfoSL(CurrPath + String(FName)));
+ else begin
+ x := Engine.GetFileInfoSL(CurrPath + String(FName));
+ if x <> nil then AList.Add(x);
+ end;
if (AList.Count = 0) and Assigned(SelectedItem) and (not SelectedItem^.UpDir) then
with SelectedItem^ do
if IsDir and (not IsLnk) and ParamBool1
then Engine.FillDirFiles(CurrPath + String(FName), AList, 1)
- else AList.Add(Engine.GetFileInfoSL(CurrPath + String(FName)));
+ else begin
+ x := Engine.GetFileInfoSL(CurrPath + String(FName));
+ if x <> nil then AList.Add(x);
+ end;
Engine.ExplicitChDir('/');
SetProgress1Params(AList.Count);
UpdateProgress1(0, '0 %');
@@ -2078,6 +2097,7 @@ var i: longint;
AList: TList;
CurrPath: string;
Fr: Single;
+ x: PDataItemSL;
begin
SkipAll := False;
with SenderThread do begin
@@ -2090,12 +2110,18 @@ begin
if (not UpDir) and Selected then
if IsDir and (not IsLnk) and ParamBool1
then Engine.FillDirFiles(CurrPath + String(FName), AList, 1)
- else AList.Add(Engine.GetFileInfoSL(CurrPath + String(FName)));
+ else begin
+ x := Engine.GetFileInfoSL(CurrPath + String(FName));
+ if x <> nil then AList.Add(x);
+ end;
if (AList.Count = 0) and Assigned(SelectedItem) and (not SelectedItem^.UpDir) then
with SelectedItem^ do
if IsDir and (not IsLnk) and ParamBool1
then Engine.FillDirFiles(CurrPath + String(FName), AList, 1)
- else AList.Add(Engine.GetFileInfoSL(CurrPath + String(FName)));
+ else begin
+ x := Engine.GetFileInfoSL(CurrPath + String(FName));
+ if x <> nil then AList.Add(x);
+ end;
Engine.ExplicitChDir('/');
SetProgress1Params(AList.Count);
UpdateProgress1(0, '0 %');
@@ -2256,6 +2282,10 @@ var Data: PDataItemSL;
begin
Result := False;
Data := Engine.GetFileInfoSL(FileName);
+ if Data = nil then begin
+ Result := False;
+ Exit;
+ end;
try
AFSymlink := TFSymlink.Create(Application);
AFSymlink.Caption := LANGFEditSymlink_Caption;