mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: the persistent sorting issue in FilesSortFoldersFirst() that was incorrect when comparing two regular files
This commit is contained in:
parent
d2971bd587
commit
523c15e297
1 changed files with 3 additions and 3 deletions
|
|
@ -798,14 +798,14 @@ var
|
|||
begin
|
||||
Attr1:= TFileAttributesProperty(List.Objects[Index1]);
|
||||
Attr2:= TFileAttributesProperty(List.Objects[Index2]);
|
||||
if Attr1.IsDirectory and Attr2.IsDirectory then
|
||||
Result:= CompareFilenames(List[Index1], List[Index2])
|
||||
else begin
|
||||
if Attr1.IsDirectory xor Attr2.IsDirectory then begin
|
||||
if Attr1.IsDirectory then
|
||||
Result:= -1
|
||||
else begin
|
||||
Result:= 1;
|
||||
end;
|
||||
end else begin
|
||||
Result:= CompareFilenames(List[Index1], List[Index2])
|
||||
end;
|
||||
end;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue