Skip to content

Commit

Permalink
tests: fix love.filesystem mounting
Browse files Browse the repository at this point in the history
  • Loading branch information
slime73 committed Feb 9, 2025
1 parent f03cf6a commit 34affbd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/modules/filesystem/physfs/Filesystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ bool Filesystem::setIdentity(const char *ident, bool appendToPath)
// This is done so the save directory is only created on-demand.
if (!mountCommonPathInternal(COMMONPATH_APP_SAVEDIR, nullptr, MOUNT_PERMISSIONS_READWRITE, appendToPath, false))
saveDirectoryNeedsMounting = true;
else
saveDirectoryNeedsMounting = false;

// Mount any other app common paths with directory creation immediately
// instead of on-demand, since to get to this point they would have to be
Expand Down
2 changes: 1 addition & 1 deletion testing/tests/filesystem.lua
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ love.test.filesystem.mountCommonPath = function(test)
end
local mount6 = love.filesystem.mountCommonPath('userdocuments', 'userdocuments', 'readwrite')
local ok = pcall(love.filesystem.mountCommonPath, 'fakepath', 'fake', 'readwrite')
test:assertTrue(mount1, 'check mount appsavedir')
test:assertFalse(mount1, 'check mount appsavedir') -- This is already mounted, we can't do it again.
test:assertTrue(mount2, 'check mount appdocuments')
test:assertTrue(mount3, 'check mount userhome')
test:assertTrue(mount4, 'check mount userappdata')
Expand Down

0 comments on commit 34affbd

Please sign in to comment.