Compare commits

..

1 Commits

Author SHA1 Message Date
lizzie 6a3058c481 2026-09-08 00:52:24
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2026-09-08 00:52:24 +00:00
2 changed files with 6 additions and 6 deletions
+5 -1
View File
@@ -57,7 +57,11 @@ std::string GetFutureSaveDataPath(SaveDataSpaceId space_id, SaveDataType type, u
SaveDataFactory::SaveDataFactory(Core::System& system_, ProgramId program_id_,
VirtualDir save_directory_)
: system{system_}, program_id{program_id_}, dir{std::move(save_directory_)} {}
: system{system_}, program_id{program_id_}, dir{std::move(save_directory_)} {
// Delete all temporary storages
// On hardware, it is expected that temporary storage be empty at first use.
dir->DeleteSubdirectoryRecursive("temp");
}
SaveDataFactory::~SaveDataFactory() = default;
@@ -336,10 +336,6 @@ Result FileSystemController::RegisterProcess(
ProcessId process_id, ProgramId program_id,
std::shared_ptr<FileSys::RomFSFactory>&& romfs_factory) {
std::scoped_lock lk{registration_lock};
if (registrations.empty()) {
const auto save_directory = system.GetFilesystem()->OpenDirectory(Common::FS::GetEdenPathString(Common::FS::EdenPath::SaveDir), FileSys::OpenMode::ReadWrite);
if (save_directory != nullptr) save_directory->DeleteSubdirectoryRecursive("temp");
}
registrations.emplace(process_id, Registration{
.program_id = program_id,
@@ -802,7 +798,7 @@ void LoopProcess(Core::System& system) {
const auto FileSystemProxyFactory = [&] { return std::make_shared<FSP_SRV>(system); };
server_manager->RegisterNamedService("fsp-ldr", std::make_shared<FSP_LDR>(system));
server_manager->RegisterNamedService("fsp:pr", std::make_shared<FSP_PR>(system));
server_manager->RegisterNamedService("fsp-pr", std::make_shared<FSP_PR>(system));
server_manager->RegisterNamedService("fsp-srv", std::move(FileSystemProxyFactory));
ServerManager::RunServer(std::move(server_manager));
}