Skip to content

Commit

Permalink
refs #58, compile error on MinGW
Browse files Browse the repository at this point in the history
  • Loading branch information
gulrak committed Mar 23, 2020
1 parent 26077f2 commit 56827ea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/build*/
/*build*/
.vscode/
.idea/
*.swp
4 changes: 4 additions & 0 deletions include/ghc/filesystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<LONGLONG>(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<void> file(CreateFileW(detail::fromUtf8<std::wstring>(p.u8string()).c_str(), GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL), CloseHandle);
Expand Down

0 comments on commit 56827ea

Please sign in to comment.