diff options
author | Björn Stenberg <bjorn@haxx.se> | 2005-01-17 12:29:27 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2005-01-17 12:29:27 +0000 |
commit | b2d84b1607e38aaec4be56490b5194f64f1007ab (patch) | |
tree | 7d753219401125f71ab074085e0b3e40bad672c1 | |
parent | 5df90b487596b4a762947ec953374e87101f363f (diff) | |
download | rockbox-b2d84b1607e38aaec4be56490b5194f64f1007ab.tar.gz rockbox-b2d84b1607e38aaec4be56490b5194f64f1007ab.zip |
Reinserted patch 1.279 (was lost in move to filetree.c)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5577 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/filetree.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/filetree.c b/apps/filetree.c index 98d59b9e9a..aaf99dce92 100644 --- a/apps/filetree.c +++ b/apps/filetree.c @@ -135,6 +135,14 @@ static int compare(const void* p1, const void* p2) if (e1->attr & ATTR_DIRECTORY && e2->attr & ATTR_DIRECTORY) { /* two directories */ criteria = global_settings.sort_dir; + + if (e1->attr & ATTR_VOLUME || e2->attr & ATTR_VOLUME) + { /* a volume identifier is involved */ + if (e1->attr & ATTR_VOLUME && e2->attr & ATTR_VOLUME) + criteria = 0; /* two volumes: sort alphabetically */ + else /* only one is a volume: volume first */ + return (e2->attr & ATTR_VOLUME) - (e1->attr & ATTR_VOLUME); + } } else if (!(e1->attr & ATTR_DIRECTORY) && !(e2->attr & ATTR_DIRECTORY)) { /* two files */ |