summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/submission_package.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-09-21submisson_package: Fix edge case with improperly sized filenamesZach Hilman1-1/+2
Prevents a crash if the filename is less than 9 characters long.
2019-07-01file_sys/submission_package: Don't warn about missing DeltaFragment NCAsBakugo1-4/+7
DeltaFragments are not useful to us and are often not included in patch NSPs.
2019-06-12common/hex_util: Combine HexVectorToString() and HexArrayToString()Lioncash1-5/+8
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-06-10nsp: Correct status codes for extracted NSPsZach Hilman1-0/+5
Avoids all extracted NSPs being marked as error file type because they don't have program NCAs.
2019-06-10nsp: Use title ID from NPDM metadata for extracted type NSPsZach Hilman1-0/+21
Avoids 0 being used as title ID for all extracted NSPs.
2019-03-27core: Port current uses of RegisteredCache to ContentProviderZach Hilman1-6/+7
2018-11-02file_sys: Use common KeyManager in NCA container typesZach Hilman1-1/+1
Creates a single KeyManager for the entire container and then passes it into the NCA constructor, eliminating several unnecessary KeyManager reads.
2018-10-19vfs: Remove InterpretAsDirectory and related functionsZach Hilman1-4/+0
When writing VFS, it initally seemed useful to include a function to in-place convert container files into directories in one homogenous directory structure, but re-evaluating it now there have been plenty of chances to use it and there has always been a better way. Removing as it is unused and likely will not be used.
2018-10-05romfs_factory: Extract packed update setter to new functionZach Hilman1-1/+4
2018-10-03submission_package: Avoid dangling std::string_view within SetTicketKeys()Lioncash1-2/+5
GetName() returns a std::string by value, not by reference, so after the std::string_view is constructed, it's not well defined to actually execute any member functions of std::string_view that attempt to access the data, as the std::string has already been destroyed. Instead, we can just use a std::string and erase the last four characters.
2018-10-03submission_package: Correct location of null check within SetTicketKeys()Lioncash1-3/+6
If a ticket file was ever a null pointer, we'd cause a null pointer dereference, as we were calling GetExtension() on the pointer instance.
2018-10-03submission_package: Use std::string's rfind() when looking for the extension in InitializeExeFSAndRomFS()Lioncash1-1/+1
When searching for a file extension, it's generally preferable to begin the search at the end of the string rather than the beginning, as the whole string isn't going to be walked just to check for something at the end of it.
2018-10-03submission_package: Ensure the 'extracted' member variable is always initializedLioncash1-2/+0
If an error occurs when constructing the PartitionFilesystem instance, the constructor would be exited early, which wouldn't initialize the extracted data member, making it possible for other code to perform an uninitialized read by calling the public IsExtractedType() member function. This prevents that.
2018-10-03submission_package: Move ExeFS and RomFS initialization to its own functionLioncash1-10/+17
Like the other two bits of factored out code, this can also be put within its own function. We can also modify the code so that it accepts a const reference to a std::vector of files, this way, we can deduplicate the file retrieval. Now the constructor for NSP isn't a combination of multiple behaviors in one spot. It's nice and separate.
2018-10-03submission_package: Move NCA reading code to its own functionLioncash1-43/+46
This too, is completely separate behavior from what is in the constructor, so we can move this to its own isolated function to keep everything self-contained.
2018-10-03submission_package: Move ticket key setting to its own functionLioncash1-21/+28
This behavior is entirely independent of the surrounding code, so it can be put in its own function to keep the behavior separate.
2018-10-03submission_package: Invert conditionals within NSP's constructor to reduce nestingLioncash1-45/+49
We can use early continues here to reduce the amount of nesting.
2018-09-05file_sys/submission_package: Correct constructor initialization list orderLioncash1-2/+2
Orders the elements in the sequence to match the order in which they'll actually be initialized in.
2018-09-05file_sys/submission_package: Replace includes with forward declarations where applicableLioncash1-1/+7
2018-09-04nsp: Fix error masking issue with XCI filesZach Hilman1-1/+4
Now display correct error instead of catch-all MissingProgramNCA
2018-09-04main: Only show DRD deprecation warning onceZach Hilman1-0/+1
2018-09-04nsp: Comply with style and performance guidelinesZach Hilman1-24/+33
2018-09-04file_sys: Add Nintendo Submission Package (NSP)Zach Hilman1-0/+226