diff options
Diffstat (limited to 'service/OneService.cpp')
-rw-r--r-- | service/OneService.cpp | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/service/OneService.cpp b/service/OneService.cpp index 534dfbf9..c1b24050 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -1916,38 +1916,7 @@ static int ShttpOnMessageComplete(http_parser *parser) std::string OneService::platformDefaultHomePath() { -#ifdef __UNIX_LIKE__ - -#ifdef __APPLE__ - // /Library/... on Apple - return std::string("/Library/Application Support/ZeroTier/One"); -#else - -#ifdef __BSD__ - // BSD likes /var/db instead of /var/lib - return std::string("/var/db/zerotier-one"); -#else - // Use /var/lib for Linux and other *nix - return std::string("/var/lib/zerotier-one"); -#endif - -#endif - -#else // not __UNIX_LIKE__ - -#ifdef __WINDOWS__ - // Look up app data folder on Windows, e.g. C:\ProgramData\... - char buf[16384]; - if (SUCCEEDED(SHGetFolderPathA(NULL,CSIDL_COMMON_APPDATA,NULL,0,buf))) - return (std::string(buf) + "\\ZeroTier\\One"); - else return std::string("C:\\ZeroTier\\One"); -#else - - return std::string(); // UNKNOWN PLATFORM - -#endif - -#endif // __UNIX_LIKE__ or not... + return OSUtils::platformDefaultHomePath(); } std::string OneService::autoUpdateUrl() |