fix, trailing dirsep removed

This commit is contained in:
Basile Burg 2015-01-28 09:31:36 +01:00
parent 94e88424af
commit 2667b67438
1 changed files with 5 additions and 1 deletions

View File

@ -121,6 +121,7 @@ var
itm: TLibraryItem; itm: TLibraryItem;
lst: TStringList; lst: TStringList;
i, j: NativeInt; i, j: NativeInt;
dir: string;
begin begin
for i := 0 to fCol.Count-1 do for i := 0 to fCol.Count-1 do
begin begin
@ -142,7 +143,10 @@ begin
begin begin
lst := TStringList.Create; lst := TStringList.Create;
try try
listFiles(lst, itm.libFile); dir := itm.libFile;
if itm.libFile[length(dir)] = DirectorySeparator then
dir := dir[1..length(dir)-1]
listFiles(lst, dir);
for j:= 0 to lst.Count-1 do for j:= 0 to lst.Count-1 do
begin begin
if extractFileExt(lst.Strings[j]) = libExt then if extractFileExt(lst.Strings[j]) = libExt then