diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2021-06-19 09:49:11 +0200 |
---|---|---|
committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2021-06-22 21:06:58 +0200 |
commit | 76b2313b25e2fd33a508f63137d5113e1ca85150 (patch) | |
tree | da79f542733f16ca27b834da5805a75503b1019a /src/common/fs/file.cpp | |
parent | common: fs: file: Remove [[nodiscard]] attribute from Flush (diff) | |
download | yuzu-76b2313b25e2fd33a508f63137d5113e1ca85150.tar yuzu-76b2313b25e2fd33a508f63137d5113e1ca85150.tar.gz yuzu-76b2313b25e2fd33a508f63137d5113e1ca85150.tar.bz2 yuzu-76b2313b25e2fd33a508f63137d5113e1ca85150.tar.lz yuzu-76b2313b25e2fd33a508f63137d5113e1ca85150.tar.xz yuzu-76b2313b25e2fd33a508f63137d5113e1ca85150.tar.zst yuzu-76b2313b25e2fd33a508f63137d5113e1ca85150.zip |
Diffstat (limited to 'src/common/fs/file.cpp')
-rw-r--r-- | src/common/fs/file.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/fs/file.cpp b/src/common/fs/file.cpp index 710e88b39..077f34995 100644 --- a/src/common/fs/file.cpp +++ b/src/common/fs/file.cpp @@ -172,7 +172,7 @@ std::string ReadStringFromFile(const std::filesystem::path& path, FileType type) size_t WriteStringToFile(const std::filesystem::path& path, FileType type, std::string_view string) { - if (!IsFile(path)) { + if (Exists(path) && !IsFile(path)) { return 0; } @@ -183,7 +183,7 @@ size_t WriteStringToFile(const std::filesystem::path& path, FileType type, size_t AppendStringToFile(const std::filesystem::path& path, FileType type, std::string_view string) { - if (!IsFile(path)) { + if (Exists(path) && !IsFile(path)) { return 0; } |