Commit e830c020f3915e272cf0810899f40dd5c84fbbf6

Russell Belfer 2013-05-01T13:50:39

Report stat error when checking if file modified

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/src/fileops.c b/src/fileops.c
index d624471..cc55207 100644
--- a/src/fileops.c
+++ b/src/fileops.c
@@ -988,8 +988,10 @@ int git_futils_filestamp_check(
 	if (stamp == NULL)
 		return 1;
 
-	if (p_stat(path, &st) < 0)
+	if (p_stat(path, &st) < 0) {
+		giterr_set(GITERR_OS, "Could not stat '%s'", path);
 		return GIT_ENOTFOUND;
+	}
 
 	if (stamp->mtime == (git_time_t)st.st_mtime &&
 		stamp->size  == (git_off_t)st.st_size   &&