summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorcomex <comexk@gmail.com>2020-08-31 16:56:19 +0200
committercomex <comexk@gmail.com>2021-01-23 22:19:29 +0100
commite9bb95ae1604ab2077ab80782c690daa005fcd21 (patch)
tree1eec360d2c4a8300206ae50931dd71c57261c624 /src
parentshader_ir: Fix comment typo (diff)
downloadyuzu-e9bb95ae1604ab2077ab80782c690daa005fcd21.tar
yuzu-e9bb95ae1604ab2077ab80782c690daa005fcd21.tar.gz
yuzu-e9bb95ae1604ab2077ab80782c690daa005fcd21.tar.bz2
yuzu-e9bb95ae1604ab2077ab80782c690daa005fcd21.tar.lz
yuzu-e9bb95ae1604ab2077ab80782c690daa005fcd21.tar.xz
yuzu-e9bb95ae1604ab2077ab80782c690daa005fcd21.tar.zst
yuzu-e9bb95ae1604ab2077ab80782c690daa005fcd21.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/file_sys/vfs_real.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/core/file_sys/vfs_real.cpp b/src/core/file_sys/vfs_real.cpp
index a287eebe3..a44ce6288 100644
--- a/src/core/file_sys/vfs_real.cpp
+++ b/src/core/file_sys/vfs_real.cpp
@@ -133,8 +133,11 @@ VirtualFile RealVfsFilesystem::MoveFile(std::string_view old_path_, std::string_
}
cache.erase(old_path);
- file->Open(new_path, "r+b");
- cache.insert_or_assign(new_path, std::move(file));
+ if (file->Open(new_path, "r+b")) {
+ cache.insert_or_assign(new_path, std::move(file));
+ } else {
+ LOG_ERROR(Service_FS, "Failed to open path {} in order to re-cache it", new_path);
+ }
} else {
UNREACHABLE();
return nullptr;
@@ -214,9 +217,12 @@ VirtualDir RealVfsFilesystem::MoveDirectory(std::string_view old_path_,
}
auto file = cached.lock();
- file->Open(file_new_path, "r+b");
cache.erase(file_old_path);
- cache.insert_or_assign(std::move(file_new_path), std::move(file));
+ if (file->Open(file_new_path, "r+b")) {
+ cache.insert_or_assign(std::move(file_new_path), std::move(file));
+ } else {
+ LOG_ERROR(Service_FS, "Failed to open path {} in order to re-cache it", file_new_path);
+ }
}
return OpenDirectory(new_path, Mode::ReadWrite);