Ver Fonte

HUE-2505 [fb] Top row is not the current directory

Updated sorting algorithm for folders that start with a special character
Enrico Berti há 11 anos atrás
pai
commit
9a8df9a

+ 8 - 2
apps/filebrowser/src/filebrowser/templates/listdir_components.mako

@@ -769,10 +769,16 @@ from django.utils.translation import ugettext as _
       self.isCurrentDirSentryManaged = ko.observable(false);
 
       self.filesSorting = function (l, r) {
-        if (l.name == ".." && r.name == "."){
+        if (l.name == "..") {
           return -1;
         }
-        else if (l.name == "." && r.name == ".."){
+        else if (r.name == "..") {
+          return 1;
+        }
+        else if (l.name == ".") {
+          return -1;
+        }
+        else if (r.name == ".") {
           return 1;
         }
         else {