darwin resource_file::write() was writing to the data fork :/

This commit is contained in:
Kelvin Sherlock 2023-08-07 08:57:09 -04:00
parent bf4399146d
commit 0e9c8616f3

View File

@ -571,7 +571,7 @@ namespace afp {
if (ec) return false;
::close(fd);
int rfd = _(::open(path.c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0666), ec);
int rfd = _(::open(s.c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0666), ec);
if (rfd < 0) return 0;
auto rv = _(::write(rfd, buffer, n), ec);