diff options
| author | xbzk <xbzk@eden-emu.dev> | 2026-07-23 21:59:55 +0200 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2026-07-23 21:59:55 +0200 |
| commit | b85f289048fc4ea3636761788e3126ab2e79d591 (patch) | |
| tree | 9b409e5a7646c852142d2ccb29414b0b0a04ba50 /src/core/file_sys/registered_cache.cpp | |
| parent | 89004124a55a5ce8c45a90dcb60afd8a107238c3 (diff) | |
[nce, fs] tico support, fix FS bug that would nuke entire 'switch' folder (#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>
Diffstat (limited to 'src/core/file_sys/registered_cache.cpp')
| -rw-r--r-- | src/core/file_sys/registered_cache.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/core/file_sys/registered_cache.cpp b/src/core/file_sys/registered_cache.cpp index ebecbaf74f..9e9db0ed4d 100644 --- a/src/core/file_sys/registered_cache.cpp +++ b/src/core/file_sys/registered_cache.cpp @@ -984,6 +984,22 @@ bool RegisteredCache::RemoveExistingEntry(u64 title_id) const { return removed_data; } +bool RegisteredCache::Delete(const NcaID& id) const { + const auto path = GetRelativePathFromNcaID(id, false, true, false); + + const bool is_file = dir->GetFileRelative(path) != nullptr; + const bool is_dir = dir->GetDirectoryRelative(path) != nullptr; + + if (is_file) { + return dir->DeleteFile(path); + } + if (is_dir) { + return dir->DeleteSubdirectoryRecursive(path); + } + + return true; +} + InstallResult RegisteredCache::RawInstallNCA(const NCA& nca, const VfsCopyFunction& copy, bool overwrite_if_exists, std::optional<NcaID> override_id) { |
