Index: ui/file_manager/file_manager/foreground/js/directory_tree.js |
diff --git a/ui/file_manager/file_manager/foreground/js/directory_tree.js b/ui/file_manager/file_manager/foreground/js/directory_tree.js |
index 8fe829e2e84b5f59a4846998f2c60f2fda973fd6..6c48f2aa220d82dc00c497178776caf6ea6eda19 100644 |
--- a/ui/file_manager/file_manager/foreground/js/directory_tree.js |
+++ b/ui/file_manager/file_manager/foreground/js/directory_tree.js |
@@ -279,9 +279,7 @@ DirectoryItem.prototype.updateSubDirectories = function( |
} |
var sortEntries = function(fileFilter, entries) { |
- entries.sort(function(a, b) { |
- return (a.name.toLowerCase() > b.name.toLowerCase()) ? 1 : -1; |
- }); |
+ entries.sort(util.compareName); |
return entries.filter(fileFilter.filter.bind(fileFilter)); |
}; |
@@ -514,6 +512,7 @@ VolumeItem.prototype.updateSubDirectories = function(recursive) { |
for (var key in this.volumeInfo.fakeEntries) |
entries.push(this.volumeInfo.fakeEntries[key]); |
} |
+ // This list is sorted by URL on purpose. |
entries.sort(function(a, b) { return a.toURL() < b.toURL(); }); |
for (var i = 0; i < entries.length; i++) { |