summaryrefslogtreecommitdiffstats
path: root/gui/fileselector.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/fileselector.cpp')
-rw-r--r--gui/fileselector.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/gui/fileselector.cpp b/gui/fileselector.cpp
index 66bf80f78..bc10f917d 100644
--- a/gui/fileselector.cpp
+++ b/gui/fileselector.cpp
@@ -790,19 +790,19 @@ bool GUIFileSelector::fileSort(FileData d1, FileData d2)
case 3: // by size largest first
if (d1.fileSize == d2.fileSize || d1.fileType == DT_DIR) // some directories report a different size than others - but this is not the size of the files inside the directory, so we just sort by name on directories
return (strcasecmp(d1.fileName.c_str(), d2.fileName.c_str()) < 0);
- return d1.fileSize > d2.fileSize;
+ return d1.fileSize < d2.fileSize;
case -3: // by size smallest first
if (d1.fileSize == d2.fileSize || d1.fileType == DT_DIR) // some directories report a different size than others - but this is not the size of the files inside the directory, so we just sort by name on directories
return (strcasecmp(d1.fileName.c_str(), d2.fileName.c_str()) > 0);
- return d1.fileSize < d2.fileSize;
+ return d1.fileSize > d2.fileSize;
case 2: // by last modified date newest first
if (d1.lastModified == d2.lastModified)
return (strcasecmp(d1.fileName.c_str(), d2.fileName.c_str()) < 0);
- return d1.lastModified > d2.lastModified;
+ return d1.lastModified < d2.lastModified;
case -2: // by date oldest first
if (d1.lastModified == d2.lastModified)
return (strcasecmp(d1.fileName.c_str(), d2.fileName.c_str()) > 0);
- return d1.lastModified < d2.lastModified;
+ return d1.lastModified > d2.lastModified;
case -1: // by name descending
return (strcasecmp(d1.fileName.c_str(), d2.fileName.c_str()) > 0);
default: // should be a 1 - sort by name ascending