diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-05-16 17:32:31 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-05-16 17:32:31 +0300 |
commit | 5f66478632d388bfae78cbbb938a42eac3956db2 (patch) | |
tree | 106a737e821a8d3c79bf0ae172c66c18305cf990 /src/fs/virtfs/fsdir.cpp | |
parent | 0a849f982988cbd7c7afdedccb210bada702238b (diff) | |
download | manaverse-5f66478632d388bfae78cbbb938a42eac3956db2.tar.gz manaverse-5f66478632d388bfae78cbbb938a42eac3956db2.tar.bz2 manaverse-5f66478632d388bfae78cbbb938a42eac3956db2.tar.xz manaverse-5f66478632d388bfae78cbbb938a42eac3956db2.zip |
Add subdir support in VirtFs::openRead.
Diffstat (limited to 'src/fs/virtfs/fsdir.cpp')
-rw-r--r-- | src/fs/virtfs/fsdir.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fs/virtfs/fsdir.cpp b/src/fs/virtfs/fsdir.cpp index 5d6f97d8e..2e69dedb1 100644 --- a/src/fs/virtfs/fsdir.cpp +++ b/src/fs/virtfs/fsdir.cpp @@ -65,7 +65,7 @@ namespace FsDir const std::string &filename, const FILEMTYPE mode) { - 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(), @@ -81,7 +81,7 @@ namespace FsDir } File *openRead(FsEntry *restrict const entry, - const std::string &filename) + std::string filename) { return openInternal(entry, filename, FILEOPEN_FLAG_READ); } |