Implement suggestion from Adam Slattery, (don't default to killing closing bug #1190.
[oweals/busybox.git] / dpkg_deb.c
index 77172b0f6d0df85d8880d39bfa4934ed5ec363fb..7f4dcbf01b1250183c52fc1c857b721e105258af 100644 (file)
@@ -26,7 +26,7 @@ extern int dpkg_deb_main(int argc, char **argv)
        char *output_buffer = NULL;
        int opt = 0;
        int arg_type = 0;
-       int deb_extract_funct = extract_create_dirs;    
+       int deb_extract_funct = extract_create_leading_dirs | extract_unconditional;    
        
        const int arg_type_prefix = 1;
        const int arg_type_field = 2;
@@ -92,6 +92,7 @@ extern int dpkg_deb_main(int argc, char **argv)
                                strcat(prefix, "/");
                        }
                }
+               mkdir(prefix, 0777);
        }
 
        if (arg_type == arg_type_filename) {