filter out some apps (hbmenu, retroarch core) if replaced via another app, or false positive. remove uneeded file.close() and commit calls.

This commit is contained in:
ITotalJustice
2025-06-25 01:39:46 +01:00
parent 2ff2923d39
commit 6f8300fb32
2 changed files with 22 additions and 7 deletions

View File

@@ -260,7 +260,6 @@ Result read_entire_file(FsFileSystem* _fs, const FsPath& path, std::vector<u8>&
File f;
R_TRY(fs.OpenFile(path, FsOpenMode_Read, &f));
ON_SCOPE_EXIT(f.Close());
s64 size;
R_TRY(f.GetSize(&size));
@@ -278,7 +277,6 @@ Result write_entire_file(FsFileSystem* _fs, const FsPath& path, const std::vecto
FsNative fs{_fs, false, ignore_read_only};
R_TRY(fs.GetFsOpenResult());
ON_SCOPE_EXIT(fs.Commit());
if (auto rc = fs.CreateFile(path, in.size(), 0); R_FAILED(rc) && rc != FsError_PathAlreadyExists) {
return rc;
@@ -286,8 +284,6 @@ Result write_entire_file(FsFileSystem* _fs, const FsPath& path, const std::vecto
File f;
R_TRY(fs.OpenFile(path, FsOpenMode_Write, &f));
ON_SCOPE_EXIT(f.Close());
R_TRY(f.SetSize(in.size()));
R_TRY(f.Write(0, in.data(), in.size(), FsWriteOption_None));
@@ -824,8 +820,6 @@ Result FileGetSizeAndTimestamp(fs::Fs* m_fs, const FsPath& path, FsTimeStampRaw*
File f;
R_TRY(m_fs->OpenFile(path, FsOpenMode_Read, &f));
ON_SCOPE_EXIT(f.Close());
R_TRY(f.GetSize(size));
} else {
struct stat st;