From 5a2a0f515f5b54c330663f5e74dd81c8967ce9c6 Mon Sep 17 00:00:00 2001 From: Marcus Holland-Moritz Date: Sun, 14 Apr 2024 16:29:50 +0200 Subject: [PATCH] fix(dwarfs): files not showing in finder w/o `noapplexattr` (gh #211) --- src/dwarfs_main.cpp | 5 +++++ test/tools_test.cpp | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/dwarfs_main.cpp b/src/dwarfs_main.cpp index 505e46d5..40d53a54 100644 --- a/src/dwarfs_main.cpp +++ b/src/dwarfs_main.cpp @@ -912,7 +912,12 @@ void op_getxattr(fuse_req_t req, fuse_ino_t ino, char const* name, size_t size << ", extra_size=" << extra_size; if (value.empty()) { + // Linux and macOS disagree on the error code for "attribute not found" +#ifdef __APPLE__ + return ENOATTR; +#else return ENODATA; +#endif } if (size == 0) { diff --git a/test/tools_test.cpp b/test/tools_test.cpp index 39937a33..bba3c60c 100644 --- a/test/tools_test.cpp +++ b/test/tools_test.cpp @@ -553,10 +553,6 @@ class driver_runner { wait_until_file_ready(mountpoint, std::chrono::seconds(5)); #else std::vector options; -#ifdef __APPLE__ - options.push_back("-o"); - options.push_back("noapplexattr"); -#endif if (!subprocess::check_run(driver, make_tool_arg(tool_arg), image, mountpoint, options, std::forward(args)...)) {