summaryrefslogtreecommitdiff
path: root/backup.c
diff options
context:
space:
mode:
Diffstat (limited to 'backup.c')
-rw-r--r--backup.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/backup.c b/backup.c
index 0ef4d9ec..6dbc17a0 100644
--- a/backup.c
+++ b/backup.c
@@ -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_valid_path() has printed an error message. */
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;
}