diff --git a/src/game/g_gui.pas b/src/game/g_gui.pas
index 7eaed7ba7128470653e26c6b53d49020b58f09b1..7acbf0b101213d9203f4c9562aa20bf4c868523c 100644 (file)
--- a/src/game/g_gui.pas
+++ b/src/game/g_gui.pas
var
SR: TSearchRec;
i: Integer;
+ sm, sc: string;
begin
Clear();
path := IncludeTrailingPathDelimiter(path);
path := ExpandFileName(path);
-// Êàòàëîãè:
+ // Êàòàëîãè:
if FDirs then
begin
if FindFirst(path+'*', faDirectory, SR) = 0 then
FindClose(SR);
end;
-// Ôàéëû:
- if FindFirst(path+FFileMask, faAnyFile, SR) = 0 then
- repeat
- AddItem(SR.Name);
- until FindNext(SR) <> 0;
-
- FindClose(SR);
+ // Ôàéëû:
+ sm := FFileMask;
+ while sm <> '' do
+ begin
+ i := Pos('|', sm);
+ if i = 0 then i := length(sm)+1;
+ sc := Copy(sm, 1, i-1);
+ Delete(sm, 1, i);
+ if FindFirst(path+sc, faAnyFile, SR) = 0 then repeat AddItem(SR.Name); until FindNext(SR) <> 0;
+ FindClose(SR);
+ end;
for i := 0 to High(FItems) do
if FItems[i][1] = #1 then