mirror of https://gitlab.com/basile.b/dexed.git
fix folder of lib files were not scanned
This commit is contained in:
parent
7f80dea641
commit
240c08a61e
|
@ -87,16 +87,40 @@ end;
|
|||
procedure TLibraryManager.getLibFiles(const someAliases, aList: TStrings);
|
||||
var
|
||||
itm: TLibraryItem;
|
||||
i: NativeInt;
|
||||
lst: TStringList;
|
||||
i, j: NativeInt;
|
||||
begin
|
||||
for i := 0 to fCol.Count-1 do
|
||||
begin
|
||||
itm := TLibraryItem(fCol.Items[i]);
|
||||
if someAliases <> nil then
|
||||
if someAliases.IndexOf(itm.libAlias) = -1 then continue;
|
||||
//
|
||||
if aList.IndexOf(itm.libFile) <> -1 then continue;
|
||||
aList.Add(itm.libFile);
|
||||
// single lib files
|
||||
if fileExists(itm.libFile) then
|
||||
begin
|
||||
if aList.IndexOf(itm.libFile) <> -1 then continue;
|
||||
aList.Add(itm.libFile);
|
||||
end
|
||||
// folder of lib file
|
||||
else if directoryExists(itm.libFile) then
|
||||
begin
|
||||
lst := TStringList.Create;
|
||||
try
|
||||
listFiles(lst, itm.libFile);
|
||||
for j:= 0 to lst.Count-1 do
|
||||
begin
|
||||
{$IFDEF WINDOWS}
|
||||
if extractFileExt(lst.Strings[j]) = '.lib' then
|
||||
{$ELSE}
|
||||
if extractFileExt(lst.Strings[j]) = '.a' then
|
||||
{$ENDIF}
|
||||
if aList.IndexOf(lst.Strings[j]) = -1 then
|
||||
aList.Add(lst.Strings[j]);
|
||||
end;
|
||||
finally
|
||||
lst.Free;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
|
|
@ -90,7 +90,6 @@ begin
|
|||
filename := ini;
|
||||
if execute then
|
||||
begin
|
||||
//TODO-cwiki: 'a folder containing many .lib can be added with an invalid fname'
|
||||
if not fileExists(filename) then
|
||||
List.Selected.SubItems[0] := extractFilePath(filename)
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue