Use create_path instead of mkdir

This commit is contained in:
Glenn L McGrath 2001-04-08 07:23:53 +00:00
parent 13e9c7ad82
commit 37849f3320
2 changed files with 6 additions and 8 deletions

View 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();

7
dpkg.c
View 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();