sha1_file.c: don't ignore an error condition in sha1_loose_object_info()
[gitweb.git] / path.c
diff --git a/path.c b/path.c
index 94ddd7eafcb11313f00dac964de520c535d202ae..c5d25a4b903bd92930df4004d30d4dffa6054456 100644 (file)
--- a/path.c
+++ b/path.c
@@ -114,7 +114,7 @@ int validate_headref(const char *path)
        fd = open(path, O_RDONLY);
        if (fd < 0)
                return -1;
-       len = read(fd, buffer, sizeof(buffer)-1);
+       len = read_in_full(fd, buffer, sizeof(buffer)-1);
        close(fd);
 
        /*