Use create_path instead of mkdir
authorGlenn L McGrath <bug1@ihug.co.nz>
Sun, 8 Apr 2001 07:23:53 +0000 (07:23 -0000)
committerGlenn L McGrath <bug1@ihug.co.nz>
Sun, 8 Apr 2001 07:23:53 +0000 (07:23 -0000)
archival/dpkg.c
dpkg.c

index b0f6adcd3bc58d9e4aebe6d20ead0a87a879959f..c992f53381f04d8d76c780b46ca700426717bdc3 100644 (file)
@@ -678,8 +678,7 @@ static int dpkg_unpackcontrol(package_t *pkg)
 
        /* clean the temp directory (dpkgcidir) be recreating it */
        remove_dir(dpkgcidir);
-       if (mkdir(dpkgcidir, S_IRWXU) != 0) {
-               perror("mkdir");
+       if (create_path(dpkgcidir, S_IRWXU) == FALSE) {
                return EXIT_FAILURE;
        }
 
@@ -864,8 +863,8 @@ extern int dpkg_main(int argc, char **argv)
                optind++;
        }
 
-       create_path(dpkgcidir, 0755);
-       create_path(infodir, 0755);
+       create_path(dpkgcidir, S_IRWXU);
+       create_path(infodir, S_IRWXU);
 
        status = status_read();
 
diff --git a/dpkg.c b/dpkg.c
index b0f6adcd3bc58d9e4aebe6d20ead0a87a879959f..c992f53381f04d8d76c780b46ca700426717bdc3 100644 (file)
--- a/dpkg.c
+++ b/dpkg.c
@@ -678,8 +678,7 @@ static int dpkg_unpackcontrol(package_t *pkg)
 
        /* clean the temp directory (dpkgcidir) be recreating it */
        remove_dir(dpkgcidir);
-       if (mkdir(dpkgcidir, S_IRWXU) != 0) {
-               perror("mkdir");
+       if (create_path(dpkgcidir, S_IRWXU) == FALSE) {
                return EXIT_FAILURE;
        }
 
@@ -864,8 +863,8 @@ extern int dpkg_main(int argc, char **argv)
                optind++;
        }
 
-       create_path(dpkgcidir, 0755);
-       create_path(infodir, 0755);
+       create_path(dpkgcidir, S_IRWXU);
+       create_path(infodir, S_IRWXU);
 
        status = status_read();