Proposal #105 done + fixed warning in filesystem code

This commit is contained in:
Bart van Strien
2010-11-07 13:51:51 +01:00
parent ba74763c2f
commit 9bf63b8607
2 changed files with 21 additions and 20 deletions
+2 -3
View File
@@ -180,8 +180,7 @@ namespace physfs
#else
char * cwd_char = new char[LOVE_MAX_PATH];
getcwd(cwd_char, LOVE_MAX_PATH);
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;
@@ -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