diff options
Diffstat (limited to 'backup.c')
-rw-r--r-- | backup.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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; } |