made it a little safer
This commit is contained in:
parent
0caffa2b82
commit
811265e28b
Binary file not shown.
|
@ -651,6 +651,7 @@ begin
|
||||||
// ... change to / and create all the directories ...
|
// ... change to / and create all the directories ...
|
||||||
CurNode := nil;
|
CurNode := nil;
|
||||||
if (Path <> '/') then begin
|
if (Path <> '/') then begin
|
||||||
|
try
|
||||||
IdFTP.ChangeDir('/');
|
IdFTP.ChangeDir('/');
|
||||||
with GetAllDirs do begin
|
with GetAllDirs do begin
|
||||||
for i := 0 to Count -1 do begin
|
for i := 0 to Count -1 do begin
|
||||||
|
@ -666,6 +667,12 @@ begin
|
||||||
Free;
|
Free;
|
||||||
end;
|
end;
|
||||||
IdFTP.ChangeDir(Path);
|
IdFTP.ChangeDir(Path);
|
||||||
|
except
|
||||||
|
if (IdFTP.Connected) then
|
||||||
|
IdFTP.ChangeDir(Path)
|
||||||
|
else
|
||||||
|
IdFTP.Connect;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
// ... find directories in start path ...
|
// ... find directories in start path ...
|
||||||
if eStr.Count <> 0 then begin
|
if eStr.Count <> 0 then begin
|
||||||
|
|
Loading…
Reference in New Issue
Block a user