summaryrefslogtreecommitdiff
path: root/win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'win32.c')
-rw-r--r--win32.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/win32.c b/win32.c
index 8ef1caa81..68ef27705 100644
--- a/win32.c
+++ b/win32.c
@@ -919,6 +919,9 @@ char *FiosBrowseTo(const FiosItem *item)
case FIOS_TYPE_DIRECT:
sprintf(path, "%s\\", item->name);
+ s = strrchr(path, '\\');
+ if (s[1] == '\0') s[0] = '\0'; // strip trailing slash
+
break;
case FIOS_TYPE_FILE: