check-ignore: fix mix of directories and other file types
[gitweb.git] / builtin / receive-pack.c
index cabdc55e0933adb09d459a5a0747c718fd2c7d1e..01dea59f5851158c8dff6a055f5cd43d763e84fc 100644 (file)
@@ -742,7 +742,7 @@ static int run_and_feed_hook(const char *hook_name, feed_fn feed,
                size_t n;
                if (feed(feed_state, &buf, &n))
                        break;
-               if (write_in_full(proc.in, buf, n) != n)
+               if (write_in_full(proc.in, buf, n) < 0)
                        break;
        }
        close(proc.in);