diff --git a/desktop_version/src/FileSystemUtils.cpp b/desktop_version/src/FileSystemUtils.cpp index b114cb86..a06d868a 100644 --- a/desktop_version/src/FileSystemUtils.cpp +++ b/desktop_version/src/FileSystemUtils.cpp @@ -241,7 +241,7 @@ bool FILESYSTEM_isMounted(const char* filename) return PHYSFS_getMountPoint(filename) != NULL; } -static bool FILESYSTEM_exists(const char *fname) +bool FILESYSTEM_exists(const char *fname) { return PHYSFS_exists(fname); } diff --git a/desktop_version/src/FileSystemUtils.h b/desktop_version/src/FileSystemUtils.h index c0269ce1..81d2d300 100644 --- a/desktop_version/src/FileSystemUtils.h +++ b/desktop_version/src/FileSystemUtils.h @@ -17,6 +17,7 @@ char *FILESYSTEM_getUserLevelDirectory(void); bool FILESYSTEM_isFile(const char* filename); bool FILESYSTEM_isMounted(const char* filename); +bool FILESYSTEM_exists(const char *filename); void FILESYSTEM_loadZip(const char* filename); bool FILESYSTEM_mountAssets(const char *path); diff --git a/desktop_version/src/editor.cpp b/desktop_version/src/editor.cpp index fbcf20c7..3f9a252a 100644 --- a/desktop_version/src/editor.cpp +++ b/desktop_version/src/editor.cpp @@ -1770,7 +1770,11 @@ bool editorclass::load(std::string& _path) } else { - MAYBE_FAIL(FILESYSTEM_mountAssets(_path.c_str())); + /* "Sometimes a level is just a level." */ + if (!FILESYSTEM_exists(_path.c_str())) + { + MAYBE_FAIL(FILESYSTEM_mountAssets(_path.c_str())); + } } if (!FILESYSTEM_loadTiXml2Document(_path.c_str(), doc))