diff options
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) |