summaryrefslogtreecommitdiff
path: root/apps/tree.c
diff options
context:
space:
mode:
authorJörg Hohensohn <hohensoh@rockbox.org>2004-12-28 22:16:07 +0000
committerJörg Hohensohn <hohensoh@rockbox.org>2004-12-28 22:16:07 +0000
commitda848576312800dc229624e928d132d0702c1854 (patch)
tree38cd01b8a9c1069a1de734e0f7eb478436715573 /apps/tree.c
parentae45d970d874217b779071b414dcd5edbf5647da (diff)
downloadrockbox-da848576312800dc229624e928d132d0702c1854.tar.gz
rockbox-da848576312800dc229624e928d132d0702c1854.zip
prepared to mount multiple partitions into one logical file system (most useful for Ondio, internal memory + external MMC)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5514 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/tree.c')
-rw-r--r--apps/tree.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/tree.c b/apps/tree.c
index 87a039223e..71af90f017 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -302,6 +302,13 @@ static int compare(const void* p1, const void* p2)
302 if (e1->attr & ATTR_DIRECTORY && e2->attr & ATTR_DIRECTORY) 302 if (e1->attr & ATTR_DIRECTORY && e2->attr & ATTR_DIRECTORY)
303 { /* two directories */ 303 { /* two directories */
304 criteria = global_settings.sort_dir; 304 criteria = global_settings.sort_dir;
305 if (e1->attr & ATTR_VOLUME || e2->attr & ATTR_VOLUME)
306 { /* a volume identifier is involved */
307 if (e1->attr & ATTR_VOLUME && e2->attr & ATTR_VOLUME)
308 criteria = 0; /* two volumes: sort alphabetically */
309 else /* only one is a volume: volume first */
310 return (e2->attr & ATTR_VOLUME) - (e1->attr & ATTR_VOLUME);
311 }
305 } 312 }
306 else if (!(e1->attr & ATTR_DIRECTORY) && !(e2->attr & ATTR_DIRECTORY)) 313 else if (!(e1->attr & ATTR_DIRECTORY) && !(e2->attr & ATTR_DIRECTORY))
307 { /* two files */ 314 { /* two files */