From 68fd386e509fa990cb8b2d063e91f08d42a3bbfe Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Wed, 6 Jan 2016 19:26:55 -1000 Subject: [PATCH] Added home and desktop to OS X system location --- hecl/lib/HECL.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hecl/lib/HECL.cpp b/hecl/lib/HECL.cpp index 34aab37f0..1b63dbfd1 100644 --- a/hecl/lib/HECL.cpp +++ b/hecl/lib/HECL.cpp @@ -467,6 +467,18 @@ std::vector> GetSystemLocations() #else #ifdef __APPLE__ { + HECL::Sstat theStat; + const char* home = getenv("HOME"); + + if (home) + { + ret.push_back(NameFromPath(home)); + std::string desktop(home); + desktop += "/Desktop"; + if (!HECL::Stat(desktop.c_str(), &theStat)) + ret.push_back(NameFromPath(desktop)); + } + /* Get mounted volumes better method OSX 10.6 and higher, see: */ /*https://developer.apple.com/library/mac/#documentation/CoreFOundation/Reference/CFURLRef/Reference/reference.html*/ /* we get all volumes sorted including network and do not relay on user-defined finder visibility, less confusing */