[PATCH] Make sq_expand() available as sq_quote().
[gitweb.git] / tar-tree.c
index c2eb21c97bd75567ded74e89b2b118730710ba01..673ac66ed6fd37eeeaa8580b2e43f0e2cee91a16 100644 (file)
@@ -77,7 +77,7 @@ static void write_trailer(void)
        write_if_needed();
        get_record();
        write_if_needed();
-       if (offset) {
+       while (offset) {
                get_record();
                write_if_needed();
        }
@@ -430,8 +430,8 @@ int main(int argc, char **argv)
        if (!archive_time)
                archive_time = time(NULL);
        if (basedir)
-               write_header("0", TYPEFLAG_DIR, NULL, NULL, basedir, 040755,
-                            NULL, 0);
+               write_header((unsigned char *)"0", TYPEFLAG_DIR, NULL, NULL,
+                       basedir, 040755, NULL, 0);
        traverse_tree(buffer, size, NULL);
        free(buffer);
        write_trailer();