summaryrefslogtreecommitdiffstats
path: root/src/common/fs
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2021-07-05 18:05:35 +0200
committerMorph <39850852+Morph1984@users.noreply.github.com>2021-07-06 11:59:47 +0200
commitd299d5531ff234d4a9c986126b872aac4ffc4dd8 (patch)
treeb8a9406f3ee8a7e8b0771223e5e99b4bb43b6cef /src/common/fs
parentMerge pull request #6537 from Morph1984/warnings (diff)
downloadyuzu-d299d5531ff234d4a9c986126b872aac4ffc4dd8.tar
yuzu-d299d5531ff234d4a9c986126b872aac4ffc4dd8.tar.gz
yuzu-d299d5531ff234d4a9c986126b872aac4ffc4dd8.tar.bz2
yuzu-d299d5531ff234d4a9c986126b872aac4ffc4dd8.tar.lz
yuzu-d299d5531ff234d4a9c986126b872aac4ffc4dd8.tar.xz
yuzu-d299d5531ff234d4a9c986126b872aac4ffc4dd8.tar.zst
yuzu-d299d5531ff234d4a9c986126b872aac4ffc4dd8.zip
Diffstat (limited to 'src/common/fs')
-rw-r--r--src/common/fs/file.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/fs/file.cpp b/src/common/fs/file.cpp
index 077f34995..022780e4e 100644
--- a/src/common/fs/file.cpp
+++ b/src/common/fs/file.cpp
@@ -347,6 +347,9 @@ u64 IOFile::GetSize() const {
return 0;
}
+ // Flush any unwritten buffered data into the file prior to retrieving the file size.
+ std::fflush(file);
+
std::error_code ec;
const auto file_size = fs::file_size(file_path, ec);