Create destination on copy if it doesn't exists.
authorHasso Tepper <hasso@estpak.ee>
Tue, 17 Mar 2009 14:41:03 +0000 (16:41 +0200)
committerHasso Tepper <hasso@estpak.ee>
Tue, 17 Mar 2009 14:53:00 +0000 (16:53 +0200)
Should conform to SUSv3 and fixes a lot of building failures in pkgsrc.

Digged-out-by: Alex Hornung
bin/pax/options.c

index 50687c3..57dbd10 100644 (file)
@@ -551,6 +551,8 @@ pax_options(int argc, char **argv)
                }
                --argc;
                dirptr = argv[argc];
+               if (mkpath(dirptr) < 0)
+                       exit(1);
                /* FALL THROUGH */
        case ARCHIVE:
        case APPND: