summaryrefslogtreecommitdiffstats
path: root/apps/bookmark.c
diff options
context:
space:
mode:
authorMagnus Holmgren <magnushol@gmail.com>2009-03-08 13:57:10 +0000
committerMagnus Holmgren <magnushol@gmail.com>2009-03-08 13:57:10 +0000
commit30f385507859259fd874728811348ae5432859c3 (patch)
tree6973dd674cdd000071c84db97d572ccecf92bb08 /apps/bookmark.c
parentf4515c3082dd413017ae06c25d7e85b1dcee30bf (diff)
downloadrockbox-30f385507859259fd874728811348ae5432859c3.tar.gz
rockbox-30f385507859259fd874728811348ae5432859c3.tar.bz2
rockbox-30f385507859259fd874728811348ae5432859c3.zip
Fix FS#9980: Bookmarking didn't work in the root of a volume (e.g., an SD card).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20236 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/bookmark.c')
-rw-r--r--apps/bookmark.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/apps/bookmark.c b/apps/bookmark.c
index 52599519a3..9f015f1156 100644
--- a/apps/bookmark.c
+++ b/apps/bookmark.c
@@ -1036,10 +1036,21 @@ static bool generate_bookmark_file_name(const char *in)
strcpy(global_bookmark_file_name, "/root_dir.bmark");
else
{
+#ifdef HAVE_MULTIVOLUME
+ /* The "root" of an extra volume need special handling too. */
+ bool volume_root = (strip_volume(in, global_bookmark_file_name) &&
+ !strcmp("/", global_bookmark_file_name));
+#endif
+
strcpy(global_bookmark_file_name, in);
if(global_bookmark_file_name[len-1] == '/')
len--;
- strcpy(&global_bookmark_file_name[len], ".bmark");
+#ifdef HAVE_MULTIVOLUME
+ if (volume_root)
+ strcpy(&global_bookmark_file_name[len], "/volume_dir.bmark");
+ else
+#endif
+ strcpy(&global_bookmark_file_name[len], ".bmark");
}
return true;