summaryrefslogtreecommitdiff
path: root/src/fs/virtfs/fsdir.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-05-16 17:50:47 +0300
committerAndrei Karas <akaras@inbox.ru>2017-05-16 17:50:47 +0300
commit3cf47056f239f1096590c27c1d401904a54f84fc (patch)
tree6e2dc17b22f9afb8079698b38d7dd12ed971b9ad /src/fs/virtfs/fsdir.cpp
parent5f66478632d388bfae78cbbb938a42eac3956db2 (diff)
downloadplus-3cf47056f239f1096590c27c1d401904a54f84fc.tar.gz
plus-3cf47056f239f1096590c27c1d401904a54f84fc.tar.bz2
plus-3cf47056f239f1096590c27c1d401904a54f84fc.tar.xz
plus-3cf47056f239f1096590c27c1d401904a54f84fc.zip
Add subdir support in VirtFs::loadFile.
Diffstat (limited to 'src/fs/virtfs/fsdir.cpp')
-rw-r--r--src/fs/virtfs/fsdir.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fs/virtfs/fsdir.cpp b/src/fs/virtfs/fsdir.cpp
index 2e69dedb1..bafe3d2e3 100644
--- a/src/fs/virtfs/fsdir.cpp
+++ b/src/fs/virtfs/fsdir.cpp
@@ -458,11 +458,11 @@ namespace FsDir
}
const char *loadFile(FsEntry *restrict const entry,
- const std::string &restrict filename,
+ std::string filename,
int &restrict fileSize)
{
const DirEntry *const dirEntry = static_cast<DirEntry*>(entry);
- const std::string path = entry->root + filename;
+ const std::string path = entry->root + entry->subDir + filename;
if (Files::existsLocal(path) == false)
return nullptr;
FILEHTYPE fd = FILEOPEN(path.c_str(),