From 73ee6abb0f058330647e9ea6690c15408938fa24 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Sat, 9 Nov 2019 14:35:05 +0300 Subject: [PATCH] cellSysCache: return /dev_hdd1 root It simplifies internal logic a little. --- rpcs3/Emu/Cell/Modules/cellSysCache.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/cellSysCache.cpp b/rpcs3/Emu/Cell/Modules/cellSysCache.cpp index 0992985f20..a12cfa25a6 100644 --- a/rpcs3/Emu/Cell/Modules/cellSysCache.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSysCache.cpp @@ -71,12 +71,6 @@ struct syscache_info { cellSysutil.fatal("cellSysCache: failed to clear cache directory '%s%s' (%s)", cache_root, cache_id, fs::g_tls_error); } - - if (!remove_root) - { - // Recreate /cache subdirectory if necessary - fs::create_path(cache_root + cache_id + "/cache"); - } } }; @@ -120,7 +114,7 @@ error_code cellSysCacheMount(vm::ptr param) std::string new_path = cache->cache_root + cache_id + '/'; // Set fixed VFS path - strcpy_trunc(param->getCachePath, "/dev_hdd1/cache"); + strcpy_trunc(param->getCachePath, "/dev_hdd1"); // Lock pseudo-mutex const auto lock = cache->init.init_always([&] @@ -128,7 +122,7 @@ error_code cellSysCacheMount(vm::ptr param) }); // Check if can reuse existing cache (won't if cache id is an empty string) - if (param->cacheId[0] && cache_id == cache->cache_id && fs::is_dir(new_path + "cache")) + if (param->cacheId[0] && cache_id == cache->cache_id) { // Isn't mounted yet on first call to cellSysCacheMount vfs::mount("/dev_hdd1", new_path); @@ -145,7 +139,7 @@ error_code cellSysCacheMount(vm::ptr param) // Set new cache id cache->cache_id = std::move(cache_id); - fs::create_path(new_path + "cache"); + fs::create_dir(new_path); vfs::mount("/dev_hdd1", new_path); return not_an_error(CELL_SYSCACHE_RET_OK_CLEARED);