love.filesystem save-directory sandbox permission boundary
0 reputation · 14 Feb 2021, 09:02 UTC
love.filesystem save-directory sandbox permission boundary
The goal is to let a LÖVE 1.1.x game write player data to a directory chosen by the user, outside the application’s save directory. love.filesystem resolves relative paths against the save directory or bundled archive and exposes no function to broaden or redirect the PhysicsFS sandbox. It is unclear whether an absolute path outside the save directory is rejected consistently across desktop and mobile, or whether the failure mode depends on the operating system and PhysicsFS build.
Because save-directory paths differ by platform and LÖVE version, hardcoding an absolute location is not portable. The design question is where the permission boundary falls and what behavior to expect when a write targets a path outside it.
Does love.filesystem.write return false or raise an error for an absolute path outside the save directory? Is the sandbox boundary enforced identically on Windows, macOS, Linux, Android, and iOS in LÖVE 1.1.x? Can the boundary be widened without modifying the engine or using platform-specific code?