made it a little safer

This commit is contained in:
Christian Hammacher 2007-02-12 19:35:01 +00:00
parent 0caffa2b82
commit 811265e28b
2 changed files with 20 additions and 13 deletions

Binary file not shown.

View File

@ -651,6 +651,7 @@ begin
// ... change to / and create all the directories ...
CurNode := nil;
if (Path <> '/') then begin
try
IdFTP.ChangeDir('/');
with GetAllDirs do begin
for i := 0 to Count -1 do begin
@ -666,6 +667,12 @@ begin
Free;
end;
IdFTP.ChangeDir(Path);
except
if (IdFTP.Connected) then
IdFTP.ChangeDir(Path)
else
IdFTP.Connect;
end;
end;
// ... find directories in start path ...
if eStr.Count <> 0 then begin