eden/src/core/file_sys
xbzk f3af5d0c25
[fs] moved temp folder cleanup upstream (per-application level) to avoid per-program retrigger (#4375)
- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions).
- [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md)
- [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability.

-------------------

This issue was observed in MGS Master Collection Volume II, MGS4: Guns of the Patriots, Chapter 4: Shadow Moses

That title is a bundle, and that specific chapter is a program (MGS 1st stage), launched by a program (MGS4), launched by an application (main title bundle).

Upon decoding guest panic message, it was exposed that an abort was triggered after trying to create a save in nand/temp/gclvar.bak file.
Further instrumentation exposed the error on that file's path, caused from a previous deletion of that folder.
In the same session that folder had been already cleaned and created successfully, which evidences an undesired re-cleaning of the temp structure.

The issue was the fact that the MGS4 to MGS transition also calls EnsureSaveData>...>SaveDataFactory creator, and that was destroying the previous created temp structure. After that stage, the return from MSG to MSG4 was causing the same issue again.

By moving the deletion to the guest application level, the factory creation was called only once, as it should be, and the issue is gone.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4375
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: lizzie <lizzie@eden-emu.dev>
2026-09-10 22:30:07 +02:00
..
fsa [meta] fix license headers (#2547) 2025-09-21 21:58:59 +02:00
fssrv Address review comments 2024-02-19 19:20:46 +01:00
fssystem [hle] correct IClientProcess::RegisterClient, impl cmd 3100,3102 for ns:vm (#4376) 2026-09-09 11:13:42 +02:00
system_archive [hle] Firmware 23.0.0 (#4390) 2026-09-10 22:28:39 +02:00
vfs [common] Switch to boost::unordered_flat containers (#4326) 2026-08-31 02:58:09 +02:00
bis_factory.cpp User Data Migration from Citron, Sudachi, and Yuzu (#91) 2025-05-08 22:16:07 +00:00
bis_factory.h vfs: Move vfs files to their own directory 2024-01-25 16:40:42 -05:00
card_image.cpp [common/logging] Simplify logging logic and fix issues when logging before system is created (#3688) 2026-03-12 18:29:15 +01:00
card_image.h vfs: Move vfs files to their own directory 2024-01-25 16:40:42 -05:00
common_funcs.h general: Convert source file copyright comments over to SPDX 2022-04-23 05:55:32 -04:00
content_archive.cpp [core, hle, video_core, memory] Improve multi-process, display layers, dynamic shader cache and rework overlay (#4238) 2026-08-29 01:04:02 +02:00
content_archive.h [core, hle, video_core, memory] Improve multi-process, display layers, dynamic shader cache and rework overlay (#4238) 2026-08-29 01:04:02 +02:00
control_metadata.cpp [file_sys] Avoid crash on empty NACP language entries (#4062) 2026-06-05 17:20:24 +02:00
control_metadata.h [core/file_sys] implement IApplicationFunctions::GetPseudoDeviceId; common PatchManager::GetNACP for base|updates (#4159) 2026-08-04 01:50:54 +02:00
errors.h service: bcat: Address review issues 2024-02-10 00:23:23 -06:00
fs_directory.h scope_exit: Make constexpr 2024-02-19 16:00:46 +01:00
fs_file.h Address review comments and fix compilation problems 2024-01-25 16:43:53 -05:00
fs_filesystem.h [fs] Add known FileSystemAttribute struct fields (from libhac) (#3275) 2026-01-25 17:03:52 +01:00
fs_memory_management.h fs: Add FileSystemAccessor classes 2024-02-19 19:20:40 +01:00
fs_operate_range.h Address review comments and fix compilation problems 2024-01-25 16:43:53 -05:00
fs_path.h fs: Add FileSystemAccessor classes 2024-02-19 19:20:40 +01:00
fs_path_utility.h [common] replace Common::(DerivedFrom, IsArithmetic, Size, ConvertibleTo, IsIntegral) with libstdc++ equivalents (#290) 2025-11-07 17:03:01 +01:00
fs_save_data_types.h [fs, qlaunch] add CreateSaveDataFileSystemWithCreationInfo2 and make qlaunch work again (#2760) 2025-10-17 22:23:21 +02:00
fs_string_util.h fs: Add FileSystemAccessor classes 2024-02-19 19:20:40 +01:00
fsmitm_romfsbuild.cpp vfs: Move vfs files to their own directory 2024-01-25 16:40:42 -05:00
fsmitm_romfsbuild.h vfs: Move vfs files to their own directory 2024-01-25 16:40:42 -05:00
ips_layer.cpp [ips_layer] remove trailing whitespace to fix hex parsing on TLTD mods (#4336) 2026-09-09 13:01:40 +02:00
ips_layer.h [file_sys] robust-er IPSwitch compiler (#3911) 2026-08-30 08:10:51 +02:00
kernel_executable.cpp [core/loader] prevent program_image reallocations in NSO+KIP loading methods (#3639) 2026-02-28 01:06:33 +01:00
kernel_executable.h [core/loader] prevent program_image reallocations in NSO+KIP loading methods (#3639) 2026-02-28 01:06:33 +01:00
nca_metadata.cpp [common/logging] Simplify logging logic and fix issues when logging before system is created (#3688) 2026-03-12 18:29:15 +01:00
nca_metadata.h [core, hle, video_core, memory] Improve multi-process, display layers, dynamic shader cache and rework overlay (#4238) 2026-08-29 01:04:02 +02:00
partition_filesystem.cpp [common/logging] Simplify logging logic and fix issues when logging before system is created (#3688) 2026-03-12 18:29:15 +01:00
partition_filesystem.h Port changes from Early Access 2025-04-04 03:40:46 +02:00
patch_manager.cpp [file_sys] robust-er IPSwitch compiler (#3911) 2026-08-30 08:10:51 +02:00
patch_manager.h [core/file_sys] implement IApplicationFunctions::GetPseudoDeviceId; common PatchManager::GetNACP for base|updates (#4159) 2026-08-04 01:50:54 +02:00
program_metadata.cpp [fmt] use {#:x} instead of 0x{:#x} (#4170) 2026-07-25 21:47:07 +02:00
program_metadata.h vfs: Move vfs files to their own directory 2024-01-25 16:40:42 -05:00
registered_cache.cpp [common] Switch to boost::unordered_flat containers (#4326) 2026-08-31 02:58:09 +02:00
registered_cache.h [common] Switch to boost::unordered_flat containers (#4326) 2026-08-31 02:58:09 +02:00
romfs.cpp [meta] fix license headers (#2547) 2025-09-21 21:58:59 +02:00
romfs.h vfs: Move vfs files to their own directory 2024-01-25 16:40:42 -05:00
romfs_factory.cpp [common/logging] Simplify logging logic and fix issues when logging before system is created (#3688) 2026-03-12 18:29:15 +01:00
romfs_factory.h vfs: Move vfs files to their own directory 2024-01-25 16:40:42 -05:00
savedata_factory.cpp [fs] moved temp folder cleanup upstream (per-application level) to avoid per-program retrigger (#4375) 2026-09-10 22:30:07 +02:00
savedata_factory.h fs: Add and use fs_save_data_types.h 2024-02-19 19:06:31 +01:00
sdmc_factory.cpp [file_sys] resize SD card size in 4GiB chunks (#3921) 2026-05-09 05:28:22 +02:00
sdmc_factory.h vfs: Move vfs files to their own directory 2024-01-25 16:40:42 -05:00
submission_package.cpp [core, hle, video_core, memory] Improve multi-process, display layers, dynamic shader cache and rework overlay (#4238) 2026-08-29 01:04:02 +02:00
submission_package.h vfs: Move vfs files to their own directory 2024-01-25 16:40:42 -05:00
xts_archive.cpp [crypto] Atomize all traces of MbedTLS, and require OpenSSL 3+ (#3606) 2026-02-23 02:50:13 +01:00
xts_archive.h vfs: Move vfs files to their own directory 2024-01-25 16:40:42 -05:00