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

This commit is contained in:
Alex Szpakowski
2013-08-01 02:39:54 -03:00
parent 411d16b063
commit ce9d0be1ea
@@ -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;