builtin/fetch cleanup: always set default value for submodule recursing
[gitweb.git] / rerere.c
index 1351b0c3fbd47e9f6e913e586081a7317670f807..c26c29f87a6f35d2efffd226fa8922f36cd0bb37 100644 (file)
--- a/rerere.c
+++ b/rerere.c
@@ -489,8 +489,9 @@ static int handle_file(const char *path, unsigned char *sha1, const char *output
        if (output) {
                io.io.output = fopen(output, "w");
                if (!io.io.output) {
+                       error_errno("Could not write %s", output);
                        fclose(io.input);
-                       return error_errno("Could not write %s", output);
+                       return -1;
                }
        }