diff --git a/include/ghc/filesystem.hpp b/include/ghc/filesystem.hpp index c2fd72b..20fca5c 100644 --- a/include/ghc/filesystem.hpp +++ b/include/ghc/filesystem.hpp @@ -4650,7 +4650,7 @@ GHC_INLINE bool remove(const path& p, std::error_code& ec) noexcept ec = detail::make_system_error(error); } else if(attr & FILE_ATTRIBUTE_READONLY) { - auto new_attr = attr & ~FILE_ATTRIBUTE_READONLY; + auto new_attr = attr & ~static_cast(FILE_ATTRIBUTE_READONLY); if(!SetFileAttributesW(cstr, new_attr)) { auto error = ::GetLastError(); ec = detail::make_system_error(error);