From: DeaDDooMER Date: Thu, 7 Sep 2023 14:40:01 +0000 (+0300) Subject: gui: do not show directories as wads and language files X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=233712fffbff81a4df04b7b026014e1e9981e9c1;p=d2df-editor.git gui: do not show directories as wads and language files --- diff --git a/src/editor/f_addresource.pas b/src/editor/f_addresource.pas index a0bebb9..913f19f 100644 --- a/src/editor/f_addresource.pas +++ b/src/editor/f_addresource.pas @@ -65,7 +65,7 @@ begin FFullResourceName := ''; FResourceSelected := False; - if FindFirst(WadsDir + DirectorySeparator + '*.*', faAnyFile, SR) = 0 then + if FindFirst(WadsDir + DirectorySeparator + '*.*', faReadOnly, SR) = 0 then repeat cbWADList.Items.Add(SR.Name); until FindNext(SR) <> 0; diff --git a/src/editor/g_language.pas b/src/editor/g_language.pas index ea1f236..3f7c5de 100644 --- a/src/editor/g_language.pas +++ b/src/editor/g_language.pas @@ -1343,7 +1343,7 @@ begin list := TStringList.Create; list.Duplicates := dupIgnore; list.Add(InSourceLanguage); - if FindFirst(LangDir + DirectorySeparator + langfilename + '.*.lng', faAnyFile, info) = 0 then + if FindFirst(LangDir + DirectorySeparator + langfilename + '.*.lng', faReadOnly, info) = 0 then begin repeat list.Add(Copy(ExtractFileNameWithoutExt(info.Name), Length(langfilename) + 2));