summaryrefslogtreecommitdiffstats
path: root/apps/files/js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/js')
-rw-r--r--apps/files/js/filelist.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 3e311655c91..9f43045d502 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -369,7 +369,12 @@
this.setSort(sort, (this._sortDirection === 'desc')?'asc':'desc');
}
else {
- this.setSort(sort, 'asc');
+ if ( sort == 'name' ) { //default sorting of name is opposite to size and mtime
+ this.setSort(sort, 'asc');
+ }
+ else {
+ this.setSort(sort, 'desc');
+ }
}
this.reload();
}