From a14a29d681b98462a8061b9a0227ce96393f5ae8 Mon Sep 17 00:00:00 2001 From: Stephen Miller Date: Wed, 30 Apr 2025 12:36:57 -0500 Subject: [PATCH] Cleaner code --- src/emulator.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/emulator.cpp b/src/emulator.cpp index a072a6c29..5f25569dd 100644 --- a/src/emulator.cpp +++ b/src/emulator.cpp @@ -224,15 +224,15 @@ void Emulator::Run(const std::filesystem::path& file, const std::vectorMount(mount_data_dir, "/data"); // should just exist, manually create with game serial + + // Mounting temp folders const auto& mount_temp_dir = Common::FS::GetUserPath(Common::FS::PathType::TempDataDir) / id; - if (!std::filesystem::exists(mount_temp_dir)) { - std::filesystem::create_directory(mount_temp_dir); - } else { - // Temportary directory should be cleared on each boot. + if (std::filesystem::exists(mount_temp_dir)) { + // Temp folder 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 + std::filesystem::create_directory(mount_temp_dir); + mnt->Mount(mount_temp_dir, "/temp0"); mnt->Mount(mount_temp_dir, "/temp"); const auto& mount_download_dir =