forked from len0rd/rockbox
simulator: Fix browsing into secondary drive on multidrive targets
Change-Id: I4e993acdedb516f0ae4fc230a62cb00de8dcef86
This commit is contained in:
parent
10e883fe02
commit
e8d7a8baaf
1 changed files with 5 additions and 2 deletions
|
@ -307,9 +307,12 @@ int sim_get_os_path(char *buffer, const char *path, size_t bufsize)
|
||||||
#ifdef HAVE_MULTIVOLUME
|
#ifdef HAVE_MULTIVOLUME
|
||||||
if (level != 1)
|
if (level != 1)
|
||||||
break; /* Volume spec only valid @ root level */
|
break; /* Volume spec only valid @ root level */
|
||||||
|
if (p[-1] != PATH_SEPCH)
|
||||||
|
break;
|
||||||
|
|
||||||
const char *next;
|
const char *next;
|
||||||
volume = path_strip_volume(p, &next, true);
|
volume = path_strip_volume(p-1, &next, true);
|
||||||
|
|
||||||
if (volume == ROOT_VOLUME)
|
if (volume == ROOT_VOLUME)
|
||||||
volume = 0; /* FIXME: root no longer implies volume 0 */
|
volume = 0; /* FIXME: root no longer implies volume 0 */
|
||||||
|
|
||||||
|
@ -831,7 +834,7 @@ int os_volume_path(IF_MV(int volume, ) char *buffer, size_t bufsize)
|
||||||
char volname[VOL_MAX_LEN + 1];
|
char volname[VOL_MAX_LEN + 1];
|
||||||
get_volume_name(volume, volname);
|
get_volume_name(volume, volname);
|
||||||
|
|
||||||
if (path_append(tmpbuf, PA_SEP_HARD, volname, sizeof (volname))
|
if (path_append(tmpbuf, PA_SEP_HARD, volname, sizeof (tmpbuf))
|
||||||
>= sizeof (volname))
|
>= sizeof (volname))
|
||||||
return -1;
|
return -1;
|
||||||
#endif /* HAVE_MULTIVOLUME */
|
#endif /* HAVE_MULTIVOLUME */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue