summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2016-06-23 12:37:15 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2016-06-23 12:37:15 -0700
commit32d9850263ad10be75d967d495e236392fac32a1 (patch)
tree5476ac5a6c582c4b93920924d79f0fea6bc45b52 /service
parenta5ea8cc5cbf6c9252d02725eed8a7be86d0e71c6 (diff)
downloadinfinitytier-32d9850263ad10be75d967d495e236392fac32a1.tar.gz
infinitytier-32d9850263ad10be75d967d495e236392fac32a1.zip
More new CLI work.
Diffstat (limited to 'service')
-rw-r--r--service/OneService.cpp33
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()