]> git.tdb.fi Git - libs/core.git/blobdiff - source/fs/osx/dir_location.cpp
Add wrappers for environment manipulation functions
[libs/core.git] / source / fs / osx / dir_location.cpp
index 89d6f576a9dc470e4c0efeabe9024c914ad2fb81..b58b971961e25cdb83db4abe9f51e31c917c0fef 100644 (file)
@@ -1,4 +1,5 @@
 #include <msp/core/application.h>
+#include <msp/core/environ.h>
 #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 ".";