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
If --partial was specified, make sure that make_backup is turned
[rsync/rsync.git]
/
backup.c
diff --git
a/backup.c
b/backup.c
index
2c69acd
..
b2f6de0
100644
(file)
--- a/
backup.c
+++ b/
backup.c
@@
-98,7
+98,7
@@
static int make_bak_dir(char *fullpath)
if (p >= rel) {
/* Try to transfer the directory settings of the
* actual dir that the files are coming from. */
if (p >= rel) {
/* Try to transfer the directory settings of the
* actual dir that the files are coming from. */
- if (do_
lstat(rel, &st) !=
0) {
+ if (do_
stat(rel, &st) <
0) {
rsyserr(FERROR, errno,
"make_bak_dir stat %s failed",
full_fname(rel));
rsyserr(FERROR, errno,
"make_bak_dir stat %s failed",
full_fname(rel));
@@
-148,10
+148,12
@@
static int keep_backup(char *fname)
/* return if no file to keep */
#if SUPPORT_LINKS
/* return if no file to keep */
#if SUPPORT_LINKS
-
if (do_lstat(fname, &st)) return 1
;
+
ret_code = do_lstat(fname, &st)
;
#else
#else
-
if (do_stat(fname, &st)) return 1
;
+
ret_code = do_stat(fname, &st)
;
#endif
#endif
+ if (ret_code < 0)
+ return 1;
file = make_file(fname, NULL, NO_EXCLUDES);
file = make_file(fname, NULL, NO_EXCLUDES);