fixed yet another bug
This commit is contained in:
parent
3d932c8a36
commit
444e2caa68
Binary file not shown.
|
@ -84,7 +84,7 @@ begin
|
|||
if DirectoryExists(ePath) then begin
|
||||
if FindFirst(ePath + '*.*', faAnyFile, eSearch) = 0 then begin
|
||||
repeat
|
||||
if (eSearch.Attr and faDirectory = faDirectory) and (eSearch.Name <> '.') and (eSearch.Name <> '..') and (LowerCase(eSearch.Name) <> 'sourcemods') then
|
||||
if (eSearch.Attr and faDirectory = faDirectory) and (eSearch.Name <> '.') and (eSearch.Name <> '..') then
|
||||
Result.Add(eSearch.Name)
|
||||
until FindNext(eSearch) <> 0;
|
||||
end;
|
||||
|
|
|
@ -34,7 +34,7 @@ begin
|
|||
Result := eDirectories;
|
||||
end
|
||||
else
|
||||
Result := nil;
|
||||
Result := TStringList.Create; // bad but prevents exception!
|
||||
end;
|
||||
|
||||
function GetModPathName(eMod: String): String;
|
||||
|
|
|
@ -415,9 +415,10 @@ begin
|
|||
for i := 0 to Count -1 do begin
|
||||
SteamPath := ePath + Strings[i] + '\dedicated server\';
|
||||
if DirectoryExists(SteamPath) then begin
|
||||
eStr := GetAllMods(SteamPath, False);
|
||||
if eStr.Count <> 0 then begin
|
||||
CurNode := trvMods.Items.Add(nil, Strings[i]);
|
||||
|
||||
eStr := GetAllMods(SteamPath, False);
|
||||
for k := 0 to eStr.Count -1 do
|
||||
trvMods.Items.AddChild(CurNode, eStr[k]);
|
||||
eStr.Free;
|
||||
|
@ -426,6 +427,7 @@ begin
|
|||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
Free;
|
||||
end;
|
||||
|
@ -467,9 +469,9 @@ begin
|
|||
for i := 0 to Count -1 do begin
|
||||
SteamPath := ePath + Strings[i] + '\';
|
||||
if DirectoryExists(SteamPath) then begin
|
||||
eStr := GetAllMods(SteamPath, False);
|
||||
CurNode := trvMods.Items.Add(nil, Strings[i]);
|
||||
|
||||
eStr := GetAllMods(SteamPath, False);
|
||||
for k := 0 to eStr.Count -1 do
|
||||
trvMods.Items.AddChild(CurNode, eStr[k]);
|
||||
eStr.Free;
|
||||
|
@ -482,6 +484,9 @@ begin
|
|||
trvMods.Items.AddChild(CurNode, eStr[k]);
|
||||
eStr.Free;
|
||||
end;
|
||||
|
||||
if CurNode.Count = 0 then
|
||||
CurNode.Free;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
|
Loading…
Reference in New Issue
Block a user