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
This commit is contained in:
Magnus Holmgren 2009-03-08 13:57:10 +00:00
parent f4515c3082
commit 30f3855078

View file

@ -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;