aboutsummaryrefslogtreecommitdiff
path: root/src/core/file_sys/registered_cache.cpp
AgeCommit message (Collapse)Author
2024-01-25vfs: Move vfs files to their own directoryFearlessTobi
2023-10-13fsmitm_romfsbuild: avoid unnecessary copies of vfs pointersLiam
2023-09-16registered_cache: correct file deletion caseLiam
2023-09-12qt: add verification for installed contentsLiam
2023-08-26registered_cache: create fake CNMT entries for program updates of ↵liamwhite
multiprogram applications (#11319)
2023-08-16file_sys: tolerate empty NCALiam
2023-08-15vfs: expand support for NCA readingLiam
2023-02-14remove static from pointer sized or smaller types for aesthetics, change ↵arades79
constexpr static to static constexpr for consistency Signed-off-by: arades79 <scravers@protonmail.com>
2023-02-14add static lifetime to constexpr values to force compile time evaluation ↵arades79
where possible Signed-off-by: arades79 <scravers@protonmail.com>
2022-06-13common: Change semantics of UNREACHABLE to unconditionally crashLiam
2022-04-23general: Convert source file copyright comments over to SPDXMorph
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.
2022-03-27registered_cache: Prevent nullptr dereference when accumulating filesMorph
For whatever reason, nca_file/dir can be nullptr in the list of files/dirs. I have not determined the cause of this yet, so add a nullptr check for these prior to dereferencing them.
2021-06-23General: Resolve fmt specifiers to adhere to 8.0.0 API where applicableLioncash
Also removes some deprecated API usages.
2021-05-25common: fs: Rework the Common Filesystem interface to make use of ↵Morph
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
2021-05-16main: Prevent installing base titles into NANDMorph
Many users have been installing their base titles into NAND instead of adding them into the games list. This prevents users from installing any base titles and warns the user about the action.
2021-05-02file_sys: Resolve cases of variable shadowingLioncash
Brings us closer to enabling -Wshadow as an error in the core code.
2021-01-05core: Silence warnings when compiling without assertsReinUsesLisp
2020-08-23registered_cache: Make use of ends_with for string suffix checkingLioncash
Simplifies code.
2020-08-23registered_cache: Make use of designated initializersLioncash
Removes the need for comments to indicate the fields being assigned.
2020-08-16common/fileutil: Convert namespace to Common::FSLioncash
Migrates a remaining common file over to the Common namespace, making it consistent with the rest of common files. This also allows for high-traffic FS related code to alias the filesystem function namespace as namespace FS = Common::FS; for more concise typing.
2020-08-03Merge pull request #4468 from lioncash/regcachebunnei
registered_cache: Resolve -Wmaybe_uninitialized warnings
2020-08-03registered_cache: Resolve -Wmaybe_uninitialized warningsLioncash
While we're at it, we can avoid a redundant map lookup.
2020-07-29registered_cache: Add support for removing folder ncasMorph
2020-07-16Check for empty section0 and CNMT prior to installMorph
2020-07-15Use proper install result when overwriting filesMorph
2020-07-15Remove global system instance and address feedbackMorph
2020-07-15registered_cache: Remove previous update/dlc if it exists on installMorph
- This checks for and removes old updates or dlc based on title id. If a content meta nca exists within the registered cache, it will attempt to remove all the ncas associated with the content meta before installing a new update/dlc
2020-05-20crypto: Make KeyManager a singleton classFearlessTobi
Previously, we were reading the keys everytime a KeyManager object was created, causing yuzu to reread the keys file multiple hundreds of times when loading the game list. With this change, it is only loaded once. On my system, this decreased game list loading times by a factor of 20.
2020-04-15CMakeLists: Specify -Wextra on linux buildsLioncash
Allows reporting more cases where logic errors may exist, such as implicit fallthrough cases, etc. We currently ignore unused parameters, since we currently have many cases where this is intentional (virtual interfaces). While we're at it, we can also tidy up any existing code that causes warnings. This also uncovered a few bugs as well.
2019-11-12core: Migrate off deprecated mbedtls functionsLioncash
These functions are marked for deprecation and it's recommended that the *_ret variants be used instead.
2019-09-21configure_debug: Move reporting option to loggingZach Hilman
2019-09-21yuzu: Port old usages of Filesystem namespace to FilesystemControllerZach Hilman
2019-09-21registered_cache: Process *.cnmt.nca filesZach Hilman
Needed to use the RegisteredCache/PlaceholderCache on gamecards.
2019-09-21registered_cache: Implement PlaceholderCache to manage placeholder and ↵Zach Hilman
installing content
2019-07-02file_sys: Rename other ContentRecordType membersBakugo
2019-07-01file_sys/registered_cache: Improve missing metadata errorBakugo
This can happen when installing NSPs too, not just XCIs.
2019-07-01file_sys/registered_cache: Ignore DeltaFragment NCAs during installationBakugo
DeltaFragments are only used to download and apply partial patches on a real console, and are not useful to us at all. Most patch NSPs do not include them, and when they do, it's a waste of space to install them.
2019-06-25glue: Correct missing bytes in ApplicationLaunchParameterZach Hilman
2019-06-24registered_cache: Add getter to determine source slot in content provider unionZach Hilman
Used to determine StorageId source for application data.
2019-06-12common/hex_util: Combine HexVectorToString() and HexArrayToString()Lioncash
These can be generified together by using a concept type to designate them. This also has the benefit of not making copies of potentially very large arrays.
2019-03-26file_sys: Create ContentProvider interface and default implementationsZach Hilman
2019-03-19file_sys/content_archive: Amend name of Data_Unknown5 enum entryLioncash
While we're at it, give each entry some documentation.
2018-12-01file_sys/registered_cache: Eliminate variable shadowingLioncash
Also inverts if statements where applicable to allow unindenting code a little bit.
2018-11-27file_sys/registered_cache: Use regular const references instead of ↵Lioncash
std::shared_ptr for InstallEntry() These parameters don't need to utilize a shared lifecycle directly in the interface. Instead, the caller should provide a regular reference for the function to use. This also allows the type system to flag attempts to pass nullptr and makes it more generic, since it can now be used in contexts where a shared_ptr isn't being used (in other words, we don't constrain the usage of the interface to a particular mode of memory management).
2018-11-01file_sys: Use common KeyManager in NCA container typesZach Hilman
Creates a single KeyManager for the entire container and then passes it into the NCA constructor, eliminating several unnecessary KeyManager reads.
2018-10-30global: Use std::optional instead of boost::optional (#1578)Frederic L
* get rid of boost::optional * Remove optional references * Use std::reference_wrapper for optional references * Fix clang format * Fix clang format part 2 * Adressed feedback * Fix clang format and MacOS build
2018-10-17qt: Add support for dumping a DLC Data RomFSZach Hilman
2018-10-17registered_cache: Deduplicate results of ListEntry and ListEntryFilterZach Hilman
Prevents a Entry from appearing in the list twice if the user has it installed in two places (e.g. User NAND and SDMC)
2018-10-16file_sys/registered_cache: Use unique_ptr and regular pointers instead of ↵Lioncash
shared_ptrs where applicable The data retrieved in these cases are ultimately chiefly owned by either the RegisteredCache instance itself, or the filesystem factories. Both these should live throughout the use of their contained data. If they don't, it should be considered an interface/design issue, and using shared_ptr instances here would mask that, as the data would always be prolonged after the main owner's lifetime ended. This makes the lifetime of the data explicit and makes it harder to accidentally create cyclic references. It also makes the interface slightly more flexible than the previous API, as a shared_ptr can be created from a unique_ptr, but not the other way around, so this allows for that use-case if it ever becomes necessary in some form.
2018-09-25vfs_concat/vfs_layered: Remove friend declarations from ConcatenatedVfsFileLioncash
Given these are only added to the class to allow those functions to access the private constructor, it's a better approach to just make them static functions in the interface, to make the dependency explicit.