diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-02-27 20:06:01 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-02-27 20:06:01 +0300 |
commit | 0018db94c954ee8eb3764c688a7ff7d3324ddee0 (patch) | |
tree | 0bc60f668d48c83af9fe400c40f2134a4ed04eec /src/fs/virtfsdir.cpp | |
parent | bf41330551a76ea426ace38dbc57c333ef5112cc (diff) | |
download | manaplus-0018db94c954ee8eb3764c688a7ff7d3324ddee0.tar.gz manaplus-0018db94c954ee8eb3764c688a7ff7d3324ddee0.tar.bz2 manaplus-0018db94c954ee8eb3764c688a7ff7d3324ddee0.tar.xz manaplus-0018db94c954ee8eb3764c688a7ff7d3324ddee0.zip |
Add own user dir in VirtFsDir.
Diffstat (limited to 'src/fs/virtfsdir.cpp')
-rw-r--r-- | src/fs/virtfsdir.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/fs/virtfsdir.cpp b/src/fs/virtfsdir.cpp index d27355d40..605ad2aac 100644 --- a/src/fs/virtfsdir.cpp +++ b/src/fs/virtfsdir.cpp @@ -51,6 +51,7 @@ namespace std::vector<VirtDirEntry*> mEntries; std::string mWriteDir; std::string mBaseDir; + std::string mUserDir; bool mPermitLinks = false; VirtFsFuncs funcs; } // namespace @@ -268,6 +269,7 @@ namespace VirtFsDir mBaseDir = getRealPath(getFileDir(name)); #endif // defined(__native_client__) + mUserDir = getHomePath(); initFuncs(&funcs); } @@ -287,6 +289,11 @@ namespace VirtFsDir return mBaseDir.c_str(); } + const char *getUserDir() + { + return mUserDir.c_str(); + } + std::string getRealDir(const std::string &restrict filename) { if (checkPath(filename) == false) |