mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 13:20:43 +00:00
(Zarch) If last character is a slash, strip it - this will
prevent 'path up' from failing
This commit is contained in:
parent
c113f02683
commit
31c600b753
@ -549,7 +549,15 @@ void render_lay_root(zui_t *zui)
|
|||||||
unsigned cwd_offset;
|
unsigned cwd_offset;
|
||||||
|
|
||||||
if (!zui->load_cwd)
|
if (!zui->load_cwd)
|
||||||
|
{
|
||||||
zui->load_cwd = strdup(zui->set->menu_content_directory);
|
zui->load_cwd = strdup(zui->set->menu_content_directory);
|
||||||
|
if ((zui->load_cwd[strlen(zui->load_cwd)-1] == '/')
|
||||||
|
#ifdef _WIN32
|
||||||
|
|| (zui->load_cwd[strlen(zui->load_cwd)-1] == '\\')
|
||||||
|
#endif
|
||||||
|
)
|
||||||
|
zui->load_cwd[strlen(zui->load_cwd)-1] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (!zui->load_dlist)
|
if (!zui->load_dlist)
|
||||||
{
|
{
|
||||||
@ -580,7 +588,11 @@ void render_lay_root(zui_t *zui)
|
|||||||
if (zui_list_item(zui, 0, tabbed.tabline_size + 40, "^ .."))
|
if (zui_list_item(zui, 0, tabbed.tabline_size + 40, "^ .."))
|
||||||
{
|
{
|
||||||
path_basedir(zui->load_cwd);
|
path_basedir(zui->load_cwd);
|
||||||
if (zui->load_cwd[strlen(zui->load_cwd)-1] == '/')
|
if ((zui->load_cwd[strlen(zui->load_cwd)-1] == '/')
|
||||||
|
#ifdef _WIN32
|
||||||
|
|| (zui->load_cwd[strlen(zui->load_cwd)-1] == '\\')
|
||||||
|
#endif
|
||||||
|
)
|
||||||
zui->load_cwd[strlen(zui->load_cwd)-1] = 0;
|
zui->load_cwd[strlen(zui->load_cwd)-1] = 0;
|
||||||
|
|
||||||
dir_list_free(zui->load_dlist);
|
dir_list_free(zui->load_dlist);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user