From ce9d0be1ea3ce13802cea79a8de64da545077b11 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Thu, 1 Aug 2013 02:39:54 -0300 Subject: [PATCH] Fixed love.filesystem.mount to consistently fail to mount things which are inside the game source directory, instead of only failing when the source dir is a zipped .love --- src/modules/filesystem/physfs/Filesystem.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/modules/filesystem/physfs/Filesystem.cpp b/src/modules/filesystem/physfs/Filesystem.cpp index 475b7587d..f82eb2baa 100644 --- a/src/modules/filesystem/physfs/Filesystem.cpp +++ b/src/modules/filesystem/physfs/Filesystem.cpp @@ -196,6 +196,12 @@ bool Filesystem::mount(const char *archive, const char *mountpoint) return false; std::string realPath(realDir); + + // Always disallow mounting of files inside the game source, since it won't + // work anyway if the game source is a zipped .love file. + if (realPath.find(game_source) == 0) + return false; + realPath += LOVE_PATH_SEPARATOR; realPath += archive;