Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Manpage improvements for --stats, --human-readable, and --list-only.
[rsync/rsync.git]
/
backup.c
diff --git
a/backup.c
b/backup.c
index
0ef4d9e
..
e535e6f
100644
(file)
--- 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';
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)
if (errno == EEXIST) {
val = validate_backup_dir();
if (val > 0)
@@
-160,13
+160,13
@@
char *get_backup_name(const char *fname)
/* copy fname into backup_dir_buf while validating the dirs. */
if (copy_valid_path(fname))
return backup_dir_buf;
/* copy fname into backup_dir_buf while validating the dirs. */
if (copy_valid_path(fname))
return backup_dir_buf;
+ /* copy_valid_path() has printed an error message. */
return NULL;
return NULL;
- } else {
- if (stringjoin(backup_dir_buf, MAXPATHLEN,
- fname, backup_suffix, NULL) < MAXPATHLEN)
- return backup_dir_buf;
}
}
+ if (stringjoin(backup_dir_buf, MAXPATHLEN, fname, backup_suffix, NULL) < MAXPATHLEN)
+ return backup_dir_buf;
+
rprintf(FERROR, "backup filename too long\n");
return NULL;
}
rprintf(FERROR, "backup filename too long\n");
return NULL;
}