mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-31 14:35:19 +00:00
Clear temp folder on boot
My tests rely on this, and some games do too. Two birds with one stone
This commit is contained in:
parent
384e036533
commit
ad089f014e
@ -227,6 +227,10 @@ void Emulator::Run(const std::filesystem::path& file, const std::vector<std::str
|
|||||||
const auto& mount_temp_dir = Common::FS::GetUserPath(Common::FS::PathType::TempDataDir) / id;
|
const auto& mount_temp_dir = Common::FS::GetUserPath(Common::FS::PathType::TempDataDir) / id;
|
||||||
if (!std::filesystem::exists(mount_temp_dir)) {
|
if (!std::filesystem::exists(mount_temp_dir)) {
|
||||||
std::filesystem::create_directory(mount_temp_dir);
|
std::filesystem::create_directory(mount_temp_dir);
|
||||||
|
} else {
|
||||||
|
// Temportary directory should be cleared on each boot.
|
||||||
|
std::filesystem::remove_all(mount_temp_dir);
|
||||||
|
std::filesystem::create_directory(mount_temp_dir);
|
||||||
}
|
}
|
||||||
mnt->Mount(mount_temp_dir, "/temp0"); // called in app_content ==> stat/mkdir
|
mnt->Mount(mount_temp_dir, "/temp0"); // called in app_content ==> stat/mkdir
|
||||||
mnt->Mount(mount_temp_dir, "/temp");
|
mnt->Mount(mount_temp_dir, "/temp");
|
||||||
|
Loading…
Reference in New Issue
Block a user