From 9fbec6e44c7381ab28e78a991d37b57092459e99 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Fri, 30 Apr 2010 12:58:17 -0700 Subject: [PATCH] May as well use do_mkdir() directly these days. --- backup.c | 2 +- main.c | 2 +- util.c | 7 ------- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/backup.c b/backup.c index 6dbc17a0..e535e6f5 100644 --- a/backup.c +++ b/backup.c @@ -98,7 +98,7 @@ static BOOL copy_valid_path(const char *fname) for ( ; b; name = b + 1, b = strchr(name, '/')) { *b = '\0'; - while (mkdir_defmode(backup_dir_buf) < 0) { + while (do_mkdir(backup_dir_buf, ACCESSPERMS) < 0) { if (errno == EEXIST) { val = validate_backup_dir(); if (val > 0) diff --git a/main.c b/main.c index 66412916..0455734d 100644 --- a/main.c +++ b/main.c @@ -639,7 +639,7 @@ static char *get_local_name(struct file_list *flist, char *dest_path) exit_cleanup(RERR_SYNTAX); } - if (mkdir_defmode(dest_path) != 0) { + if (do_mkdir(dest_path, ACCESSPERMS) != 0) { rsyserr(FERROR, errno, "mkdir %s failed", full_fname(dest_path)); exit_cleanup(RERR_FILEIO); diff --git a/util.c b/util.c index 2c4c571e..02085d42 100644 --- a/util.c +++ b/util.c @@ -177,13 +177,6 @@ int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode) } } -/* This creates a new directory with default permissions. Now that we - * leave the original umask set, we can just mkdir with mode 777. */ -int mkdir_defmode(char *fname) -{ - return do_mkdir(fname, ACCESSPERMS); -} - /* Create any necessary directories in fname. Any missing directories are * created with default permissions. Returns < 0 on error, or the number * of directories created. */ -- 2.34.1