diff options
author | Wayne Davison <wayned@samba.org> | 2009-04-11 11:31:31 -0700 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2009-04-11 11:51:07 -0700 |
commit | 3696674bc62b0c1250027dbeedafdd7ebafdcf8b (patch) | |
tree | ead58ed7615e0ed0a8cdb32678ce3d5ec96b9e98 /receiver.c | |
parent | 5e2d51ee0675dc39d89c9ec11297a33c12b9181d (diff) | |
download | android_external_rsync-3696674bc62b0c1250027dbeedafdd7ebafdcf8b.tar.gz android_external_rsync-3696674bc62b0c1250027dbeedafdd7ebafdcf8b.tar.bz2 android_external_rsync-3696674bc62b0c1250027dbeedafdd7ebafdcf8b.zip |
More backup improvements:
- Changed get_backup_name() to verify the backup path, and make any
missing directories. This avoids accidental use of a symlink as a dir
in a backup path, and gets rid of any other non-dirs that are in the
way. It also avoids the need for various operations to retry after
calling make_bak_dir(), simplifying several pices of code.
- Changed create_directory_path() to make_path(), giving it flags that
lets the caller decide if it should skip a leading slash or drop the
trailing filename.
- Mention when we create the backup directory, so the user is not caught
unaware when rsync uses a directory they didn't expect.
- Got rid of some dir-moving backup code that is not used.
- Added a little more backup-debug output.
Diffstat (limited to 'receiver.c')
-rw-r--r-- | receiver.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -147,7 +147,7 @@ int open_tmpfile(char *fnametmp, const char *fname, struct file_struct *file) * information should have been previously transferred, but that may * not be the case with -R */ if (fd == -1 && relative_paths && errno == ENOENT - && create_directory_path(fnametmp) == 0) { + && make_path(fnametmp, MKP_SKIP_SLASH | MKP_DROP_NAME) == 0) { /* Get back to name with XXXXXX in it. */ get_tmpname(fnametmp, fname); fd = do_mkstemp(fnametmp, file->mode & INITACCESSPERMS); |