diff options
| author | bunnei <bunneidev@gmail.com> | 2021-06-22 17:21:59 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-22 17:21:59 -0700 |
| commit | 0308a2679ed87aa9cb07e2bde19e165dc454c322 (patch) | |
| tree | a1d29aacabab533673bff8043ec11864d68ed022 /src/common/fs/fs.cpp | |
| parent | 255f8d22d7cbb85b6d7742d46a1a6c55262ad4e1 (diff) | |
| parent | 2fa207058ba6cb1c4d519942e5543bd942f03f6c (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.cpp | 5 |
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; } |
