This write will failing sooner or later when someone's disk fills up.
That'll leave someone with
a truncated file.
Signed-off-by: Morten Welinder <[EMAIL PROTECTED]>
--- read-cache.c
+++ read-cache.c 2005-04-15 20:32:52.111187168 -0400
@@ -276,9 +276,13 @@
" This is bad, bad, BAD!\a\n");
return 0;
}
- write(fd, buf, size);
- close(fd);
- return 0;
+
+ if (write(fd, buf, size) != size) {
+ close(fd);
+ return error("Failed to write file %s\n", filename);
+ }
+
+ return close(fd);
}
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html