fixed worst bug ever

This commit is contained in:
Christian Hammacher 2006-05-13 20:49:37 +00:00
parent 1370305fb0
commit f51620c2d7
3 changed files with 18 additions and 4 deletions

Binary file not shown.

View File

@ -96,7 +96,11 @@ var eList: TStringList;
i: integer; i: integer;
begin begin
eList := TStringList.Create; eList := TStringList.Create;
frmMain.IdFTP.List(eList); try
frmMain.IdFTP.List(eList);
except
// nothing, not an exception?!
end;
frmMain.IdFTP.DirectoryListing.LoadList(eList); frmMain.IdFTP.DirectoryListing.LoadList(eList);
eList.Clear; eList.Clear;
for i := 0 to frmMain.IdFTP.DirectoryListing.Count -1 do begin for i := 0 to frmMain.IdFTP.DirectoryListing.Count -1 do begin
@ -113,7 +117,11 @@ var eList: TStringList;
i, eStart: integer; i, eStart: integer;
begin begin
eList := TStringList.Create; eList := TStringList.Create;
frmMain.IdFTP.List(eList, '', True); try
frmMain.IdFTP.List(eList, '', True);
except
// nothing
end;
eStart := 0; eStart := 0;

View File

@ -209,8 +209,14 @@ begin
ePath := '/' + CurNode.Text + ePath; ePath := '/' + CurNode.Text + ePath;
CurNode := CurNode.Parent; CurNode := CurNode.Parent;
until (not Assigned(CurNode)); until (not Assigned(CurNode));
IdFTP.ChangeDir(ePath); IdFTP.ChangeDir(ePath);
IdFTP.List(eStr, '', False);
try
IdFTP.List(eStr, '', False);
except
// worst "exception" ever. bad indy!
end;
if eStr.IndexOf('liblist.gam') = -1 then begin if eStr.IndexOf('liblist.gam') = -1 then begin
MessageBox(Handle, 'Invalid directory. Please select your mod directory and try again.', PChar(Application.Title), MB_ICONWARNING); MessageBox(Handle, 'Invalid directory. Please select your mod directory and try again.', PChar(Application.Title), MB_ICONWARNING);
eStr.Free; eStr.Free;