From 71cbb23b423c5e3f6e14addd919aca00dff74eb2 Mon Sep 17 00:00:00 2001 From: kanjitalk755 Date: Sun, 12 Jan 2020 19:59:51 +0900 Subject: [PATCH] fix for writing resource fork on APFS --- BasiliskII/src/MacOSX/extfs_macosx.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/BasiliskII/src/MacOSX/extfs_macosx.cpp b/BasiliskII/src/MacOSX/extfs_macosx.cpp index b610ee7a..dea61b00 100644 --- a/BasiliskII/src/MacOSX/extfs_macosx.cpp +++ b/BasiliskII/src/MacOSX/extfs_macosx.cpp @@ -251,7 +251,9 @@ static int open_rsrc(const char *path, int flag) char rsrc_path[MAX_PATH_LENGTH]; make_rsrc_path(path, rsrc_path); - return open(rsrc_path, flag); + int fd = open(rsrc_path, flag); + if (fd < 0 && flag == O_WRONLY) fd = open(rsrc_path, O_WRONLY | O_CREAT); // for APFS + return fd; }