mirror of
https://github.com/love2d/love.git
synced 2026-08-21 05:00:08 +02:00
Proposal #105 done + fixed warning in filesystem code
This commit is contained in:
@@ -180,9 +180,8 @@ namespace physfs
|
||||
#else
|
||||
char * cwd_char = new char[LOVE_MAX_PATH];
|
||||
|
||||
getcwd(cwd_char, LOVE_MAX_PATH);
|
||||
|
||||
cwd = cwd_char; // if getcwd fails, cwd_char (and thus cwd) will still be empty
|
||||
if(getcwd(cwd_char, LOVE_MAX_PATH))
|
||||
cwd = cwd_char; // if getcwd fails, cwd_char (and thus cwd) will still be empty
|
||||
|
||||
delete [] cwd_char;
|
||||
#endif
|
||||
@@ -219,7 +218,7 @@ namespace physfs
|
||||
{
|
||||
char * xdgdatahome = getenv("XDG_DATA_HOME");
|
||||
if (!xdgdatahome)
|
||||
appdata = getUserDirectory();
|
||||
appdata = std::string(getUserDirectory()) + "/.local/share/";
|
||||
else
|
||||
appdata = xdgdatahome;
|
||||
}
|
||||
|
||||
@@ -53,6 +53,8 @@
|
||||
#else
|
||||
# ifdef LOVE_MACOSX
|
||||
# define LOVE_APPDATA_FOLDER "LOVE"
|
||||
# elif defined(LOVE_LINUX)
|
||||
# define LOVE_APPDATA_FOLDER "LOVE"
|
||||
# else
|
||||
# define LOVE_APPDATA_FOLDER ".love"
|
||||
# endif
|
||||
|
||||
Reference in New Issue
Block a user