aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/service/filesystem/filesystem.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [hle] Enforce max_sessions, add bpc:ams service (#4394)lizzie2026-09-111-3/+3
| | | | | | | | | | | | | | | | | | As per switchbrew, as per atmosphere, and some poking around. bpc:ams stubbed for now. Signed-off-by: lizzie <lizzie@eden-emu.dev> - [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. ------------------- Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4394 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
* [fs] moved temp folder cleanup upstream (per-application level) to avoid ↵xbzk2026-09-101-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* [hle] Fix fsp-pr not being found (#4379)lizzie2026-09-081-1/+1
| | | | | | | | | | | | | | | | Should be `fsp-pr`, not `fsp:pr` Signed-off-by: lizzie <lizzie@eden-emu.dev> - [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. ------------------- Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4379 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: Maufeat <sahyno1996@gmail.com>
* [fs] Add RenameDirectory support for same-parent directory renaming (#4312)PavelBARABANOV2026-08-301-5/+6
| | | | | | | | | | | | | | | | | - [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. ------------------- Fixes save corruption in Warhammer 40k: Mechanicus and other games that rename directories within the same parent folder. - Added RenameDirectory handler in IFileSystem (command 6) - Implemented same-parent directory renaming using RenameDir Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4312 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: Samuel <lizzie@eden-emu.dev>
* [filesystem] Return ResultPathAlreadyExists from CreateDirectory if path ↵crueter2026-07-251-1/+3
| | | | | | | | | | | | | | exists (#4224) Returning success when the path already exists confuses games like Eastward which use this result in their save logic. Closes https://github.com/eden-emulator/mirror/pull/10 Signed-off-by: crueter <crueter@eden-emu.dev> Co-authored-by: Tom Pratt <tom.pratt@outlook.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4224 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
* [nce, fs] tico support, fix FS bug that would nuke entire 'switch' folder ↵xbzk2026-07-231-9/+39
| | | | | | | | | | | | | | | (#4086) Contains the minimal set of functionalities to allow tico installer succeed, and tico work normally EXCEPT for game launching (which me or someone else will investigate later) First three commits are from PR 4012. The other six, kinda dizzy to explain each one. All were implemented based on tico source, switchbrew and libnx. Hopefully the commit messages will do. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4086 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: Maufeat <sahyno1996@gmail.com>
* [common/logging] Simplify logging logic and fix issues when logging before ↵lizzie2026-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | system is created (#3688) - our logging code was bigger than spdlog itself, why???? just keep it simple - fix issues when logging before logging system is even started - removes the "initialized logging twice" issue - removes uneeded indirection in file logging - uses direct formatting instead of jumping hoopla-around the fmt::format() ressult - code duplication and dead code removal as usual I did explore dup2() but I think it's not worth the hassle I did try `fwopen()` but it's better if things are just kept as-is. there is a lot of noise because I removed a bunch of redundant files on logging and just put everything in one file now normally this wouldn't be a good idea, however consider: the complexity of logging; it's less than 500 lines... does it really need a whole subsystem?!?!?! ITS JUST LOGGING Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3688 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: DraVee <chimera@dravee.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [fs/core] Load external content without NAND install (#2862)Maufeat2026-02-061-1/+37
| | | | | | | | | | | | | Adds the capability to add DLC and Updates without installing them to NAND. This was tested on Windows only and needs Android integration. Co-authored-by: crueter <crueter@eden-emu.dev> Co-authored-by: wildcard <wildcard@eden-emu.dev> Co-authored-by: nekle <nekle@protonmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2862 Reviewed-by: DraVee <dravee@eden-emu.dev> Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: Maufeat <sahyno1996@gmail.com> Co-committed-by: Maufeat <sahyno1996@gmail.com>
* [qt, android] Implement custom save path setting and migration + Implement ↵kleidis2025-12-311-3/+6
| | | | | | | | | | | | custom path settings for Android (#3154) Needs careful review and especially testing Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3154 Reviewed-by: DraVee <dravee@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev> Co-authored-by: kleidis <kleidis1@protonmail.com> Co-committed-by: kleidis <kleidis1@protonmail.com>
* User Data Migration from Citron, Sudachi, and Yuzu (#91)swurl2025-05-081-7/+7
| | | | | | | | | | | | Includes citron, sudachi, yuzu currently broken, because the eden dir is always made early? Signed-off-by: swurl <swurl@swurl.xyz> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/91 Co-authored-by: swurl <swurl@swurl.xyz> Co-committed-by: swurl <swurl@swurl.xyz>
* fs/errors: Unify naming of result codesFearlessTobi2024-01-251-19/+19
|
* fs: Replace Mode enum by OpenMode enumFearlessTobi2024-01-251-15/+15
|
* vfs: Move vfs files to their own directoryFearlessTobi2024-01-251-2/+2
|
* fs: Move fsp_srv subclasses to separate filesFearlessTobi2024-01-251-3/+3
| | | | fs: Move additional files to the fsp directory
* fsp-srv: use program registry for SetCurrentProcessLiam2024-01-111-177/+50
|
* Improve path splitting speedBreadFish642023-12-051-5/+1
|
* filesystem: Return correct error for RenameFile when dest_path already existsFearlessTobi2023-08-241-1/+10
| | | | | | Allows Grid Autosport to boot. Fixes https://github.com/yuzu-emu/yuzu/issues/8287.
* vfs: expand support for NCA readingLiam2023-08-151-0/+5
|
* fs: return result on null outputsLiam2023-08-081-4/+24
|
* general: fix incorrect conversionsLiam2023-08-081-1/+1
|
* core: remove ResultVal typeLiam2023-08-081-52/+74
|
* service: refactor server architectureLiam2023-02-211-4/+8
| | | | Converts services to have their own processes
* general: rename CurrentProcess to ApplicationProcessLiam2023-02-131-2/+2
|
* core: Replace all instances of ResultCode with Resultgerman772022-06-261-15/+14
|
* general: Convert source file copyright comments over to SPDXMorph2022-04-231-3/+2
| | | | | This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
* fix: typosAndrea Pappacoda2022-04-021-1/+1
|
* general: Get the current process program id directly from the systemMorph2021-11-041-3/+2
| | | | This allows us to avoid including KProcess' header file in files that only need to get the current process' program id.
* general: Rename GetTitleID to GetProgramIDMorph2021-11-041-2/+2
|
* core: Remove unused includesameerj2021-11-031-1/+0
|
* general: Remove MakeResult helpersMorph2021-11-021-11/+10
| | | | This is made obsolete by the presence of implicit constructors.
* vfs: Partially implement GetFileTimeStampRawMorph2021-09-141-0/+12
| | | | Gets rid of homebrew warnings using this func
* FS: Mark recursive CreateDirectory as inaccurate and temporaryMorph2021-09-121-0/+5
|
* Addressed issuesChloe2021-09-091-1/+1
| | | Co-authored-by: Mai M. <mathew1800@gmail.com>
* FS: Recursively create directories for CreateDirectoryChloe Marcec2021-09-061-8/+13
| | | | | | Originally we only created the parent directory, this caused issues for creating directories which also contained subdirectories, eg `/Folder1/Folder2` This allows the ultimate mod manager homebrew to at least boot
* filesystem: Open a read-only directory for SDMC modsMorph2021-06-281-5/+9
| | | | This prevents mod files from being locked due to the read-only share flag in Windows.
* core: Simplify SDMC mod loadinglat9nq2021-06-281-1/+2
| | | | | | | | | | If someone else wants to support other mod formats in the SDMC directory, that can be added later. For now, just allow RomFS modding here and force people to do other types of mods the old way. Addresses review comments. Co-authored-by: LC <mathew1800@gmail.com>
* core: Support LayeredFS mod from SDMC directorylat9nq2021-06-281-0/+9
| | | | | | Enables loading a mod directly from `[yuzu data directory]/sdmc/atmosphere/contents/[title_id]`. For use with some homebrew mod managers.
* fspsrv: Implement DisableAutoSaveDataCreation (#6355)Chloe2021-06-021-0/+4
| | | - Used by Mii Edit
* general: Replace RESULT_UNKNOWN with ResultUnknownMorph2021-06-021-15/+15
| | | | Transition to PascalCase for result names.
* general: Replace RESULT_SUCCESS with ResultSuccessMorph2021-06-021-16/+16
| | | | Transition to PascalCase for result names.
* common: fs: Rework the Common Filesystem interface to make use of ↵Morph2021-05-251-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | std::filesystem (#6270) * common: fs: fs_types: Create filesystem types Contains various filesystem types used by the Common::FS library * common: fs: fs_util: Add std::string to std::u8string conversion utility * common: fs: path_util: Add utlity functions for paths Contains various utility functions for getting or manipulating filesystem paths used by the Common::FS library * common: fs: file: Rewrite the IOFile implementation * common: fs: Reimplement Common::FS library using std::filesystem * common: fs: fs_paths: Add fs_paths to replace common_paths * common: fs: path_util: Add the rest of the path functions * common: Remove the previous Common::FS implementation * general: Remove unused fs includes * string_util: Remove unused function and include * nvidia_flags: Migrate to the new Common::FS library * settings: Migrate to the new Common::FS library * logging: backend: Migrate to the new Common::FS library * core: Migrate to the new Common::FS library * perf_stats: Migrate to the new Common::FS library * reporter: Migrate to the new Common::FS library * telemetry_session: Migrate to the new Common::FS library * key_manager: Migrate to the new Common::FS library * bis_factory: Migrate to the new Common::FS library * registered_cache: Migrate to the new Common::FS library * xts_archive: Migrate to the new Common::FS library * service: acc: Migrate to the new Common::FS library * applets/profile: Migrate to the new Common::FS library * applets/web: Migrate to the new Common::FS library * service: filesystem: Migrate to the new Common::FS library * loader: Migrate to the new Common::FS library * gl_shader_disk_cache: Migrate to the new Common::FS library * nsight_aftermath_tracker: Migrate to the new Common::FS library * vulkan_library: Migrate to the new Common::FS library * configure_debug: Migrate to the new Common::FS library * game_list_worker: Migrate to the new Common::FS library * config: Migrate to the new Common::FS library * configure_filesystem: Migrate to the new Common::FS library * configure_per_game_addons: Migrate to the new Common::FS library * configure_profile_manager: Migrate to the new Common::FS library * configure_ui: Migrate to the new Common::FS library * input_profiles: Migrate to the new Common::FS library * yuzu_cmd: config: Migrate to the new Common::FS library * yuzu_cmd: Migrate to the new Common::FS library * vfs_real: Migrate to the new Common::FS library * vfs: Migrate to the new Common::FS library * vfs_libzip: Migrate to the new Common::FS library * service: bcat: Migrate to the new Common::FS library * yuzu: main: Migrate to the new Common::FS library * vfs_real: Delete the contents of an existing file in CreateFile Current usages of CreateFile expect to delete the contents of an existing file, retain this behavior for now. * input_profiles: Don't iterate the input profile dir if it does not exist Silences an error produced in the log if the directory does not exist. * game_list_worker: Skip parsing file if the returned VfsFile is nullptr Prevents crashes in GetLoader when the virtual file is nullptr * common: fs: Validate paths for path length * service: filesystem: Open the mod load directory as read only
* hle: kernel: Rename Process to KProcess.bunnei2021-05-051-1/+1
|
* service: filesystem: Return proper error codes for CreateFileMorph2021-05-011-2/+7
| | | | | | This improves the accuracy of CreateFile by returning the correct error codes on certain conditions (parent directory does not exist, path already exists). This fixes saving and the loading of existing saves in New Pokemon Snap
* common: Move settings to common from core.bunnei2021-04-141-1/+1
| | | | - Removes a dependency on core and input_common from common.
* Merge pull request #5119 from Morph1984/fs-opendatastoragewithprogramindexbunnei2020-12-151-0/+25
|\ | | | | fsp_srv: Implement OpenDataStorageWithProgramIndex
| * fsp_srv: Implement OpenDataStorageWithProgramIndexMorph2020-12-081-0/+25
| | | | | | | | - Used by RollerCoaster Tycoon 3: Complete Edition
* | core: Remove unnecessary enum casts in log callsLioncash2020-12-071-8/+8
|/ | | | | Follows the video core PR. fmt doesn't require casts for enum classes anymore, so we can remove quite a few casts.
* savedata_factory: Eliminate usage of the global system instanceLioncash2020-11-271-1/+2
| | | | Now there's only two meaningful instances left in core.
* service: Eliminate usages of the global system instanceLioncash2020-11-261-5/+3
| | | | | Completely removes all usages of the global system instance within the services code by passing in the using system instance to the services.
* patch_manager: Remove usages of the global system instanceLioncash2020-11-181-2/+5
| | | | | | | With this, only 19 usages of the global system instance remain within the core library. We're almost there.