commit - 1beed9999fbf48508ec7047066ffd0c856eb9a28
commit + 7e7c1e4c1dd8fa7492c8e247bb9829c043c50723
blob - cedb4c631ede7a972c61fdd54ecbacaf59798356
blob + 45ace73306c72d723185ef208bb2d4b51fd09546
--- lib/worktree.c
+++ lib/worktree.c
fd = open(ondisk_path, O_RDWR | O_CREAT | O_EXCL | O_NOFOLLOW,
GOT_DEFAULT_FILE_MODE);
if (fd == -1) {
- err = got_error_from_errno();
if (errno == EEXIST) {
struct stat sb;
if (lstat(ondisk_path, &sb) == -1) {
update = 1;
}
} else
- return err;
+ return got_error_from_errno();
}
(*progress_cb)(progress_arg,