diff --git a/.gitignore b/.gitignore index d787f76..ba6a447 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ -/build*/ +/*build*/ .vscode/ +.idea/ +*.swp diff --git a/include/ghc/filesystem.hpp b/include/ghc/filesystem.hpp index 7951369..1c6a270 100644 --- a/include/ghc/filesystem.hpp +++ b/include/ghc/filesystem.hpp @@ -4225,7 +4225,11 @@ GHC_INLINE void resize_file(const path& p, uintmax_t size, std::error_code& ec) LARGE_INTEGER lisize; lisize.QuadPart = static_cast(size); if(lisize.QuadPart < 0) { +#ifdef ERROR_FILE_TOO_LARGE ec = detail::make_system_error(ERROR_FILE_TOO_LARGE); +#else + ec = detail::make_system_error(223); +#endif return; } std::shared_ptr file(CreateFileW(detail::fromUtf8(p.u8string()).c_str(), GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL), CloseHandle);