many more optimisations. cleaned up fs code. bug fixes etc (see below).
- fix usb using the wrong year when polling the timestamp. - fs file/dir has been re-written to allow for simplified calling and remove the need of manually closing. - add SetSize for stdio by using ftruncate. - don't truncate the file when opened in stdio. - add getcount api for stdio. - display file/dir count in filebrowser for non-native fs. - allow hash to be used on non-native fs. - slightly optimise nro parsing by manually calculating nro size rather than doing an os call. - slightly optimise nro parsing by keeping the fs struct alive between calls, rather than creating a new one on the stack. - fix filebrowser peeking into zip files that are stored on non-sd fs. - set the timestamp of a file moved to a stdio location (cut/paste). - slightly optimise daybreak update folder detection by skipping opening/polling the dir size. - set the fullpath of the file thats being hashed in progress box.
This commit is contained in:
@@ -1378,15 +1378,11 @@ Result InstallInternalStream(ui::ProgressBox* pbox, std::shared_ptr<source::Base
|
||||
|
||||
} // namespace
|
||||
|
||||
Result InstallFromFile(ui::ProgressBox* pbox, FsFileSystem* fs, const fs::FsPath& path, const ConfigOverride& override) {
|
||||
Result InstallFromFile(ui::ProgressBox* pbox, fs::Fs* fs, const fs::FsPath& path, const ConfigOverride& override) {
|
||||
return InstallFromSource(pbox, std::make_shared<source::File>(fs, path), path, override);
|
||||
// return InstallFromSource(pbox, std::make_shared<source::StreamFile>(fs, path), path, override);
|
||||
}
|
||||
|
||||
Result InstallFromFile(ui::ProgressBox* pbox, const fs::FsPath& path, const ConfigOverride& override) {
|
||||
return InstallFromFile(pbox, nullptr, path, override);
|
||||
}
|
||||
|
||||
Result InstallFromSource(ui::ProgressBox* pbox, std::shared_ptr<source::Base> source, const fs::FsPath& path, const ConfigOverride& override) {
|
||||
const auto ext = std::strrchr(path.s, '.');
|
||||
R_UNLESS(ext, Result_ContainerNotFound);
|
||||
|
||||
Reference in New Issue
Block a user