Commit f4d199c99e2463414ab27d393fa98378de352bad

Stefan Sperling 2019-12-13T10:02:48

oops, fix previous

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/worktree.c b/lib/worktree.c
index 9eb8aa6..97439bc 100644
--- a/lib/worktree.c
+++ b/lib/worktree.c
@@ -1211,7 +1211,7 @@ done:
 	if (blob)
 		got_object_blob_close(blob);
 	if (f != NULL && fclose(f) == EOF && err == NULL)
-		fclose(f);
+		err = got_error_from_errno2("fclose", abspath);
 	if (fd != -1 && close(fd) == -1 && err == NULL)
 		err = got_error_from_errno2("close", abspath);
 	return err;