summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-07-14 22:11:58 +0200
committerGitHub <noreply@github.com>2018-07-14 22:11:58 +0200
commitfd1f5c54147e4a4a223666072f0f920700f5cec2 (patch)
tree89c2bc2037be4959ece8ab25170ee1911f9ae435 /src/core
parentMerge pull request #661 from ogniK5377/assert-nit (diff)
parentFileSys: Append the requested path to the filesystem base path in DeleteFile. (diff)
downloadyuzu-fd1f5c54147e4a4a223666072f0f920700f5cec2.tar
yuzu-fd1f5c54147e4a4a223666072f0f920700f5cec2.tar.gz
yuzu-fd1f5c54147e4a4a223666072f0f920700f5cec2.tar.bz2
yuzu-fd1f5c54147e4a4a223666072f0f920700f5cec2.tar.lz
yuzu-fd1f5c54147e4a4a223666072f0f920700f5cec2.tar.xz
yuzu-fd1f5c54147e4a4a223666072f0f920700f5cec2.tar.zst
yuzu-fd1f5c54147e4a4a223666072f0f920700f5cec2.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/file_sys/disk_filesystem.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/file_sys/disk_filesystem.cpp b/src/core/file_sys/disk_filesystem.cpp
index 8c6f15bb5..d248c2df4 100644
--- a/src/core/file_sys/disk_filesystem.cpp
+++ b/src/core/file_sys/disk_filesystem.cpp
@@ -58,11 +58,13 @@ ResultVal<std::unique_ptr<StorageBackend>> Disk_FileSystem::OpenFile(const std::
}
ResultCode Disk_FileSystem::DeleteFile(const std::string& path) const {
- if (!FileUtil::Exists(path)) {
+ std::string full_path = base_directory + path;
+
+ if (!FileUtil::Exists(full_path)) {
return ERROR_PATH_NOT_FOUND;
}
- FileUtil::Delete(path);
+ FileUtil::Delete(full_path);
return RESULT_SUCCESS;
}