summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin T. H. Sandsmark <martin.sandsmark@kde.org>2016-08-21 19:11:54 (GMT)
committerMartin T. H. Sandsmark <martin.sandsmark@kde.org>2016-08-27 13:04:47 (GMT)
commita71a22ec9ec0fbfcc42a47aefd25e95ac939f83b (patch)
tree52812901988400882a3a8879be1c72ccb729a4e4
parentee71f61218704248bd77a68c6d3ada9b913ba3d7 (diff)
Sort local files by size.
-rw-r--r--src/part/localLister.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/part/localLister.cpp b/src/part/localLister.cpp
index 5a9e629..97e172e 100644
--- a/src/part/localLister.cpp
+++ b/src/part/localLister.cpp
@@ -226,6 +226,8 @@ LocalLister::scan(const QByteArray &path, const QByteArray &dirname)
closedir(dir);
+ std::sort(cwd->files.begin(), cwd->files.end(), [](File *a, File*b) { return a->size() > b->size(); });
+
return cwd;
}