summaryrefslogtreecommitdiffstats
path: root/gui/fileselector.cpp
diff options
context:
space:
mode:
authorDees_Troy <dees_troy@yahoo.com>2013-02-21 15:26:57 +0100
committerDees_Troy <dees_troy@teamw.in>2013-02-21 19:23:43 +0100
commit6ef6635ad3d5e8f6440e9ac2b67f1db8589e77b5 (patch)
treef6c1bc2e0210477d8c1fb91061f9defa135b4359 /gui/fileselector.cpp
parentadd military time option (diff)
downloadandroid_bootable_recovery-6ef6635ad3d5e8f6440e9ac2b67f1db8589e77b5.tar
android_bootable_recovery-6ef6635ad3d5e8f6440e9ac2b67f1db8589e77b5.tar.gz
android_bootable_recovery-6ef6635ad3d5e8f6440e9ac2b67f1db8589e77b5.tar.bz2
android_bootable_recovery-6ef6635ad3d5e8f6440e9ac2b67f1db8589e77b5.tar.lz
android_bootable_recovery-6ef6635ad3d5e8f6440e9ac2b67f1db8589e77b5.tar.xz
android_bootable_recovery-6ef6635ad3d5e8f6440e9ac2b67f1db8589e77b5.tar.zst
android_bootable_recovery-6ef6635ad3d5e8f6440e9ac2b67f1db8589e77b5.zip
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