diff options
-rw-r--r-- | os2.c | 2 | ||||
-rw-r--r-- | unix.c | 4 | ||||
-rw-r--r-- | win32.c | 3 |
3 files changed, 8 insertions, 1 deletions
@@ -356,6 +356,8 @@ 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: @@ -312,7 +312,9 @@ char *FiosBrowseTo(const FiosItem *item) break; case FIOS_TYPE_DIRECT: - sprintf(path, "%s\\", item->name); + sprintf(path, "%s/", item->name); + s = strrchr(path, '/'); + if (s[1] == '\0') s[0] = '\0'; // strip trailing slash break; case FIOS_TYPE_FILE: @@ -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: |