X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Ffs%2Fosx%2Fdir_location.cpp;h=b58b971961e25cdb83db4abe9f51e31c917c0fef;hp=89d6f576a9dc470e4c0efeabe9024c914ad2fb81;hb=f804a61c1c58529e7c98555a921b56bc05059d5e;hpb=31cc8f0c6e874e2417e76eda50af34fd17bcd90c diff --git a/source/fs/osx/dir_location.cpp b/source/fs/osx/dir_location.cpp index 89d6f57..b58b971 100644 --- a/source/fs/osx/dir_location.cpp +++ b/source/fs/osx/dir_location.cpp @@ -1,4 +1,5 @@ #include +#include #include "dir.h" using namespace std; @@ -16,8 +17,8 @@ Path get_home_dir() if(len) return string(buf, len); - const char *home = getenv("HOME"); - if(home) + string home = getenv("HOME"); + if(!home.empty()) return home; return ".";