Zach Hilman
da921ac3f3
loader: Add more descriptive errors
Full list of new errors and descriptions in core/loader/loader.h
7 years ago
Zach Hilman
e883f6faa8
vfs: Fix documentation
7 years ago
Zach Hilman
1e2232797a
vfs: Fix typo in VfsFilesystem docs
7 years ago
Zach Hilman
b43d01f09b
file_util: Use enum instead of bool for specifing path behavior
7 years ago
Zach Hilman
a92960a5d6
vfs: Use RealVfsFilesystem for fs-operations in RealVfsDirectory
7 years ago
Zach Hilman
d4ca68f3c5
file_sys: Add missing include in savedata_factory
7 years ago
Zach Hilman
4f44293e63
vfs: Add unreachable assert to file permissions converter
7 years ago
Zach Hilman
6b97b22716
vfs: Add RealVfsFilesystem implementation
7 years ago
Zach Hilman
325a55bb1e
vfs: Add VfsFilesystem interface and default implementation
7 years ago
Lioncash
4cfe9fad75
fsp_srv: Use std::string_view's copy() function instead of strncpy()
Given elements inserted into a vector are zeroed out, we can just copy
MAX_LEN - 1 elements and the data will already be properly null
terminated.
7 years ago
Zach Hilman
d53b3a13b3
loader: Add icon and title support to XCI
7 years ago
Zach Hilman
469f7cefe4
Use const where applicable
8 years ago
Zach Hilman
f89988272e
Avoid parsing RomFS to directory in NCA
8 years ago
Zach Hilman
3150538b3f
content_archive: Add support for titlekey cryptography
7 years ago
Lioncash
5b317d1b80
vfs_vector: Remove unused variable in FindAndRemoveVectorElement()
This wasn't being used for anything, so it can be removed.
7 years ago
Lioncash
0bb1b9c168
vfs_vector: Avoid unnecessary copies where applicable
The lambda elements should be taken by const reference here, and we can
move the virtual directory passed to ReplaceFileWithSubdirectory()
7 years ago
Zach Hilman
5b9d48ba43
Add missing parameter to files.push_back()
8 years ago
Zach Hilman
9b710a5901
Use more descriptive error codes and messages
8 years ago
Zach Hilman
f93e75f496
Use ErrorEncrypted where applicable and fix no keys crash
8 years ago
Zach Hilman
568ce6304c
Add missing includes and use const where applicable
8 years ago
Zach Hilman
272ca87298
Make XCI comply to review and style guidelines
8 years ago
Zach Hilman
03467b64e3
Extract mbedtls to cpp file
8 years ago
Zach Hilman
b10c0d291f
Remove files that are not used
8 years ago
Lioncash
2fb4f00bf7
partition_filesystem: Remove dynamic_cast in PrintDebugInfo()
We shouldn't be upcasting our file instances. Given a
PartitionFilesystem is currently designed to accept any arbitrary
VfsFile instances, casting to a more specific type than that is just bad
design, and shows an interface design issue.
8 years ago
Zach Hilman
2e4c791f79
RomFS Extraction
8 years ago
Zach Hilman
bd410ce242
VFS Regression and Accuracy Fixes ( #776 )
* Regression and Mode Fixes
* Review Fixes
* string_view correction
* Add operator& for FileSys::Mode
* Return std::string from SanitizePath
* Farming Simulator Fix
* Use != With mode operator&
8 years ago
Lioncash
6904f9f6b1
partition_filesystem: Use std::move where applicable
Avoids copying a std::string instance and avoids unnecessary atomic
reference count incrementing and decrementing.
8 years ago
Zach Hilman
ac0c52dd5f
NRO Assets and NACP file format
Cleanup
Review fixes
8 years ago
Lioncash
2cbc2717e4
vfs: Correct file_p variable usage within InterpretAsDirectory()
ReplaceFileWithSubdirectory() takes a VirtualFile and a VirtualDir, but
it was being passed a string as one of its arguments. The only reason
this never caused issues is because this template isn't instantiated
anywhere yet.
This corrects an issue before it occurs.
8 years ago
Lioncash
861405d6c0
file_util, vfs: Use std::string_view where applicable
Avoids unnecessary construction of std::string instances where
applicable.
8 years ago
Lioncash
574be087d4
file_util: Use a u64 to represent number of entries
This avoids a truncating cast on size. I doubt we'd ever traverse a
directory this large, however we also shouldn't truncate sizes away.
8 years ago
Lioncash
25e1111621
file_sys/errors: Remove redundant object constructor calls
Given we're already constructing the error code, we don't need to call
the constructor inside of it.
8 years ago
Lioncash
285dfd1a6d
vfs_real: Remove redundant copying of std::vector instances in GetFiles() and GetSubdirectories()
We already return by value, so we don't explicitly need to make the
copy.
8 years ago
Lioncash
97f7a15e70
partition_filesystem, vfs_real: Add missing standard includes
8 years ago
Lioncash
ed7f23ef32
partition_filesystem, vfs_real: Use std::move in ReplaceFileWithSubdirectory() where applicable
Avoids unnecessary atomic increment and decrement operations.
8 years ago
Lioncash
24fc1a425a
partition_filesystem, vfs_real: Use std::distance() instead of subtraction
This is a little bit more self-documenting on what is being done here.
8 years ago
Lioncash
785d86d181
vfs_offset: Simplify TrimToFit()
We can simply use std::clamp() here, instead of using an equivalent
with std::max() and std::min().
8 years ago
Lioncash
25510961ea
vfs: Make WriteBytes() overload taking a std::vector pass the std::vector by const reference
Given the data is intended to be directly written, there's no need to
take the std::vector by value and copy the data.
8 years ago
Lioncash
e523ab8b03
vfs: Use variable template variants of std::is_trivially_copyable
Provides the same behavior, but with less writing
8 years ago
Lioncash
556aaf9627
vfs: Amend constness on pointers in WriteBytes() and WriteArrays() member functions to be const qualified
These functions don't modify the data being pointed to, so these can be
pointers to const data
8 years ago
Lioncash
02e5e6fba3
vfs_offset: std::move file and name parameters of OffsetVfsFile
Avoids potentially unnecessary atomic reference count incrementing and
decrementing, as well as string copying.
8 years ago
Lioncash
3fbde66789
partition_filesystem: Return pfs_dirs member variable within GetSubdirectories()
This should be returned here, otherwise pfs_dirs is effectively only
ever added to, but never read.
8 years ago
Lioncash
f92bb43138
savedata_factory: Make SaveDataDescriptor's DebugInfo() function a const member function
This function doesn't alter class state.
8 years ago
Lioncash
a9b596c444
partition_filesystem: Ensure all class members of PartitionFilesystem are initialized
Previously is_hfs and pfs_header members wouldn't be initialized in the
constructor, as they were stored in locals instead. This would result in
things like GetName() and PrintDebugInfo() behaving incorrectly.
While we're at it, initialize the members to deterministic values as
well, in case loading ever fails.
8 years ago
Lioncash
9eb43dc910
content_archive: Make IsDirectoryExeFS() take a shared_ptr as a const reference
There's no need to take this by value when it's possible to avoid
unnecessary copies entirely like this.
8 years ago
Lioncash
701bdfd753
content_archive: Add missing standard includes
8 years ago
Lioncash
bff53f234d
content_archive: std::move VirtualFile in NCA's constructor
Gets rid of unnecessary atomic reference count incrementing and
decrementing.
8 years ago
Lioncash
47858aed98
vfs: Deduplicate accumulation code in VfsDirectory's GetSize()
We can just use a generic lambda to avoid writing the same thing twice.
8 years ago
Zach Hilman
82150bd5c1
Virtual Filesystem 2: Electric Boogaloo ( #676 )
* Virtual Filesystem
* Fix delete bug and documentate
* Review fixes + other stuff
* Fix puyo regression
8 years ago
Zach Hilman
753d85fb0c
General Filesystem and Save Data Fixes ( #670 )
8 years ago