Commit Diff


commit - 68c7693588c1316ee15664810fb8b0f06b912e1f
commit + d10c9b58e3940fc75fa5017eeb52111c2ff5ebf2
blob - 43324d9d2a975fe0fb3fd9bab3662cfaa9da691e
blob + f6e70aa814319115c3d0ab44166f2a74b9e76b1e
--- lib/worktree.c
+++ lib/worktree.c
@@ -153,7 +153,10 @@ read_meta_file(char **content, const char *path_got, c
 		goto done;
 	}
 
-	stat(path, &sb);
+	if (lstat(path, &sb) != 0) {
+		err = got_error_from_errno();
+		goto done;
+	}
 	*content = calloc(1, sb.st_size);
 	if (*content == NULL) {
 		err = got_error_from_errno();