rude wrote:Hmm. Never thought of that. How should this be dealt with? Should people be allowed to choose the write directory? (%APPDATA%/chosen, not /chosen/chosen/chosen).
Just using the filename seemed like a good idea until now. True, developers can choose the write directory via the filename, but at least the user will know which directory the game has access to just be looking at the file.
We've discussed several solutions to this ages ago, but I remember only poor ones.
Suggestions plz.
I believe one should be able to choose the LOVE application data directory or any subdirectory thereof, e.g. setSaveDirectory("snow_wars") (~> %APPDATA/love/snow_wars). If you a release of a game in two versions, or sequals - game.love and game.tgs.love, you may very well want them all to share data folders, or at least read from other versions'. Likewise, some games may want to have access to the data of other games, such as for importing save data from one game to another or a map editor used for different games.
Regardless of the above, I still believe that access to the everything accessible to the user should be accessible to the game, as is standard for applications. Reading would be a minimum, consider the almost mandatory feature of importing images of the user's liking. An option would be to, at the first trespass, present the user with a dialogue asking whether or not the game should be allowed to leave/write outside its data directories.