Skip to content

Commit

Permalink
merge pull #2978
Browse files Browse the repository at this point in the history
  • Loading branch information
gabime committed Mar 16, 2024
1 parent 5370076 commit f743a88
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/details/os_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,10 @@ int rename(const filename_t &filename1, const filename_t &filename2) noexcept {
// Return true if path exists (file or directory)
bool path_exists(const filename_t &filename) noexcept {
#ifdef SPDLOG_WCHAR_FILENAMES
auto attribs = ::GetFileAttributesW(filename.c_str());
return (::_wstat(filename.c_str(), &buffer) == 0);
#else
auto attribs = ::GetFileAttributesA(filename.c_str());
return (::_stat(filename.c_str(), &buffer) == 0);
#endif
return attribs != INVALID_FILE_ATTRIBUTES;
}

#ifdef _MSC_VER
Expand Down

0 comments on commit f743a88

Please sign in to comment.