diff options
| author | 2018-07-14 13:11:58 -0700 | |
|---|---|---|
| committer | 2018-07-14 13:11:58 -0700 | |
| commit | fd1f5c54147e4a4a223666072f0f920700f5cec2 (patch) | |
| tree | 89c2bc2037be4959ece8ab25170ee1911f9ae435 /src | |
| parent | Merge pull request #661 from ogniK5377/assert-nit (diff) | |
| parent | FileSys: Append the requested path to the filesystem base path in DeleteFile. (diff) | |
| download | yuzu-fd1f5c54147e4a4a223666072f0f920700f5cec2.tar.gz yuzu-fd1f5c54147e4a4a223666072f0f920700f5cec2.tar.xz yuzu-fd1f5c54147e4a4a223666072f0f920700f5cec2.zip | |
Merge pull request #662 from Subv/delete_file
FileSys: Append the requested path to the filesystem base path in DeleteFile
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/file_sys/disk_filesystem.cpp | 6 |
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:: | |||
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | ResultCode Disk_FileSystem::DeleteFile(const std::string& path) const { | 60 | ResultCode Disk_FileSystem::DeleteFile(const std::string& path) const { |
| 61 | if (!FileUtil::Exists(path)) { | 61 | std::string full_path = base_directory + path; |
| 62 | |||
| 63 | if (!FileUtil::Exists(full_path)) { | ||
| 62 | return ERROR_PATH_NOT_FOUND; | 64 | return ERROR_PATH_NOT_FOUND; |
| 63 | } | 65 | } |
| 64 | 66 | ||
| 65 | FileUtil::Delete(path); | 67 | FileUtil::Delete(full_path); |
| 66 | 68 | ||
| 67 | return RESULT_SUCCESS; | 69 | return RESULT_SUCCESS; |
| 68 | } | 70 | } |