Commit Diff


commit - 107f9ed516be69c1b0d914887afb558e90a1ab4f
commit + e4b9a50c4562bd5527f8a0a3c8c754c2c95031ca
blob - cbb8b461c91f58ff1ed7e56ea8b4439f80722191
blob + d13a217315b4bc76901ed6b4828f4641abb540b2
--- lib/worktree.c
+++ lib/worktree.c
@@ -142,8 +142,8 @@ read_meta_file(char **content, const char *path_got, c
 		goto done;
 	}
 
-	if (lstat(path, &sb) != 0) {
-		err = got_error_from_errno2("lstat", path);
+	if (fstat(fd, &sb) != 0) {
+		err = got_error_from_errno2("fstat", path);
 		goto done;
 	}
 	*content = calloc(1, sb.st_size);