From 34ec943b5cceec89b37c37744f87e640bcb939af Mon Sep 17 00:00:00 2001 From: Misa Date: Sat, 3 Apr 2021 14:20:27 -0700 Subject: [PATCH] Remove getDirSeparator() usage from mountAssetsFrom() PhysFS uses platform-independent notation, so we really don't need to care about getting the correct dir separator here. Especially since we don't ever do so anywhere else (e.g. load/saveTiXml2Document()), either. --- desktop_version/src/FileSystemUtils.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/desktop_version/src/FileSystemUtils.cpp b/desktop_version/src/FileSystemUtils.cpp index 167582ce..68d21853 100644 --- a/desktop_version/src/FileSystemUtils.cpp +++ b/desktop_version/src/FileSystemUtils.cpp @@ -216,7 +216,6 @@ static bool FILESYSTEM_exists(const char *fname) static bool FILESYSTEM_mountAssetsFrom(const char *fname) { const char* real_dir = PHYSFS_getRealDir(fname); - const char* dir_separator; char path[MAX_PATH]; if (real_dir == NULL) @@ -228,9 +227,7 @@ static bool FILESYSTEM_mountAssetsFrom(const char *fname) return false; } - dir_separator = PHYSFS_getDirSeparator(); - - SDL_snprintf(path, sizeof(path), "%s%s%s", real_dir, dir_separator, fname); + SDL_snprintf(path, sizeof(path), "%s/%s", real_dir, fname); if (!PHYSFS_mount(path, NULL, 0)) {