From 748b2dc257650d9ff6e740496802cb977227bc21 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 1 Nov 2013 13:27:00 +0300 Subject: move package directory variable from client into paths. --- src/utils/paths.cpp | 15 +++++++++++++++ src/utils/paths.h | 4 ++++ 2 files changed, 19 insertions(+) (limited to 'src/utils') diff --git a/src/utils/paths.cpp b/src/utils/paths.cpp index dbe0cccce..cba263027 100644 --- a/src/utils/paths.cpp +++ b/src/utils/paths.cpp @@ -52,6 +52,11 @@ #include "debug.h" +namespace +{ + std::string mPackageDir; +} // namespace + std::string getRealPath(const std::string &str) { #if defined(__OpenBSD__) || defined(__ANDROID__) || defined(__native_client__) @@ -193,3 +198,13 @@ std::string getSdStoragePath() return getenv("DATADIR2"); } #endif + +std::string getPackageDir() +{ + return mPackageDir; +} + +void setPackageDir(const std::string &dir) +{ + mPackageDir = dir; +} diff --git a/src/utils/paths.h b/src/utils/paths.h index 6e2d17808..cb0af64ad 100644 --- a/src/utils/paths.h +++ b/src/utils/paths.h @@ -43,4 +43,8 @@ std::string getDesktopDir() A_WARN_UNUSED; std::string getSdStoragePath() A_WARN_UNUSED; #endif +std::string getPackageDir() A_WARN_UNUSED; + +void setPackageDir(const std::string &dir); + #endif // UTILS_PATHS_H -- cgit v1.2.3-60-g2f50