fix for writing resource fork on APFS

This commit is contained in:
kanjitalk755 2020-01-12 19:59:51 +09:00
parent 18a908c770
commit 71cbb23b42
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}