From da54c738aed9616b00f7b0f014d9ffad1be44fc8 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Wed, 3 Aug 2016 20:28:16 -0400 Subject: [PATCH] rfds --- dot_clean.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dot_clean.cpp b/dot_clean.cpp index 41ee60d..f45a27e 100644 --- a/dot_clean.cpp +++ b/dot_clean.cpp @@ -144,7 +144,7 @@ void one_file(const std::string &data, const std::string &rsrc) noexcept try { case AS_RESOURCE: { #ifdef __sun__ int rfd = openat(fd, "com.apple.ResourceFork", O_XATTR | O_CREAT | O_TRUNC | O_WRONLY, 0666); - if (rfds < 0) throw_errno("com.apple.ResourceFork"); + if (rfd < 0) throw_errno("com.apple.ResourceFork"); defer close_fd([rfd](){ close(rfd); }); ssize_t ok = write(rfd, mf.data() + e.entryOffset, e.entryLength);