Merge pull request #30 from giuseppe/fix-copyup-file-not-accessible

copyup: fix error if lower file cannot be opened
This commit is contained in:
Daniel J Walsh 2018-12-17 14:01:09 -05:00 committed by GitHub
commit f48e1eff7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

4
main.c
View File

@ -1857,11 +1857,11 @@ copyup (struct ovl_data *lo, struct ovl_node *node)
goto success; goto success;
} }
sfd = TEMP_FAILURE_RETRY (openat (node_dirfd (node), node->path, O_RDONLY|O_NONBLOCK)); ret = sfd = TEMP_FAILURE_RETRY (openat (node_dirfd (node), node->path, O_RDONLY|O_NONBLOCK));
if (sfd < 0) if (sfd < 0)
goto exit; goto exit;
dfd = TEMP_FAILURE_RETRY (openat (lo->workdir_fd, wd_tmp_file_name, O_CREAT|O_WRONLY, st.st_mode)); ret = dfd = TEMP_FAILURE_RETRY (openat (lo->workdir_fd, wd_tmp_file_name, O_CREAT|O_WRONLY, st.st_mode));
if (dfd < 0) if (dfd < 0)
goto exit; goto exit;