Misc fixes

This commit is contained in:
Adubbz
2019-07-27 11:14:39 +10:00
parent 070e1012b8
commit 65b7ac9039
2 changed files with 7 additions and 7 deletions

View File

@@ -163,8 +163,8 @@ namespace sts::ncm {
fseek(f, offset, SEEK_SET);
fwrite(data.buffer, sizeof(u8), data.num_elements, f);
if (this->placeholder_accessor.delay_flush ^ 1) {
fsync(fileno(f));
if (!this->placeholder_accessor.delay_flush) {
fflush(f));
}
this->placeholder_accessor.FlushCache(f, placeholder_id);
@@ -598,7 +598,7 @@ namespace sts::ncm {
fseek(f, offset, SEEK_SET);
fwrite(data.buffer, sizeof(u8), data.num_elements, f);
fsync(fileno(f));
fflush(f));
if (errno != 0) {
return fsdevGetLastResult();