aboutsummaryrefslogtreecommitdiff
path: root/src/common/fs/fs.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-06-22 17:21:59 -0700
committerGitHub <noreply@github.com>2021-06-22 17:21:59 -0700
commit0308a2679ed87aa9cb07e2bde19e165dc454c322 (patch)
treea1d29aacabab533673bff8043ec11864d68ed022 /src/common/fs/fs.cpp
parent255f8d22d7cbb85b6d7742d46a1a6c55262ad4e1 (diff)
parent2fa207058ba6cb1c4d519942e5543bd942f03f6c (diff)
Merge pull request #6493 from Morph1984/fs-nodiscard
common: fs: Miscellaneous changes
Diffstat (limited to 'src/common/fs/fs.cpp')
-rw-r--r--src/common/fs/fs.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/common/fs/fs.cpp b/src/common/fs/fs.cpp
index d3159e908..9089cad67 100644
--- a/src/common/fs/fs.cpp
+++ b/src/common/fs/fs.cpp
@@ -135,8 +135,9 @@ std::shared_ptr<IOFile> FileOpen(const fs::path& path, FileAccessMode mode, File
return nullptr;
}
- if (!IsFile(path)) {
- LOG_ERROR(Common_Filesystem, "Filesystem object at path={} is not a file",
+ if (Exists(path) && !IsFile(path)) {
+ LOG_ERROR(Common_Filesystem,
+ "Filesystem object at path={} exists and is not a regular file",
PathToUTF8String(path));
return nullptr;
}