From 453996807a4806860d30bde520fcc527376f4452 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Mon, 10 Nov 2014 06:23:01 +0000 Subject: folder dialog: Seems internal TStringList.Sorted removed duplicates eg: 'Type1' and 'type1' was considered the same directory under Linux, and only one displayed. This commit fixes the issue and now all directories are displayed. --- src/gui/selectdirdialog.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/gui/selectdirdialog.inc') diff --git a/src/gui/selectdirdialog.inc b/src/gui/selectdirdialog.inc index 6a96d046..063c7972 100644 --- a/src/gui/selectdirdialog.inc +++ b/src/gui/selectdirdialog.inc @@ -135,7 +135,6 @@ begin begin try SortList := TStringList.Create; - SortList.Sorted := True; repeat // check if special file if (FileInfo.Name = '.') or (FileInfo.Name = '..') or (FileInfo.Name = '') then @@ -153,10 +152,12 @@ begin hidden files then do not add it to the list. } //if ((faHidden and FileInfo.Attr) > 0) and not FShowHidden then //continue; - SortList.Add(FileInfo.Name); end; until fpgFindNext(FileInfo) <> 0; + + SortList.Sort; + for i := 0 to SortList.Count - 1 do begin NewNode := Node.AppendText(SortList[i]); -- cgit v1.2.3-70-g09d2