Skip to content

Commit

Permalink
May as well use do_mkdir() directly these days.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wayne Davison committed Apr 30, 2010
1 parent 25082d1 commit 9fbec6e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion backup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
7 changes: 0 additions & 7 deletions util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit 9fbec6e

Please sign in to comment.