win32 error.

This commit is contained in:
Kelvin Sherlock 2016-12-18 15:09:00 -05:00
parent dc26edee3f
commit fa225d36c9
1 changed files with 1 additions and 1 deletions

View File

@ -196,7 +196,7 @@ void one_file(const std::string &data, const std::string &rsrc) noexcept try {
#ifdef _WIN32
std::string tmp = data + ":AFP_Resource";
int rfd = open(tmp.c_str(), O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0666);
if (rfd < 0) throw_errno("com.apple.ResourceFork");
if (rfd < 0) throw_errno("AFP_Resource");
defer close_fd([rfd](){ close(rfd); });
int ok = write(rfd, mf.data() + e.entryOffset, e.entryLength);
if (ok < 0) throw_errno("AFP_Resource");