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
Fixed a crash if a non-incremental-recursion transfer has a
[rsync/rsync.git]
/
flist.c
diff --git
a/flist.c
b/flist.c
index
4e302aa
..
b0b05dc
100644
(file)
--- a/
flist.c
+++ b/
flist.c
@@
-366,19
+366,23
@@
int change_pathname(struct file_struct *file, const char *dir, int dirlen)
change_dir(orig_dir, CD_SKIP_CHDIR);
}
change_dir(orig_dir, CD_SKIP_CHDIR);
}
- if (!change_dir(dir ? dir : orig_dir, CD_NORMAL)) {
+ pathname = dir;
+ pathname_len = dirlen;
+
+ if (!dir)
+ dir = orig_dir;
+
+ if (!change_dir(dir, CD_NORMAL)) {
chdir_error:
io_error |= IOERR_GENERAL;
rsyserr(FERROR, errno, "change_dir %s failed", full_fname(dir));
chdir_error:
io_error |= IOERR_GENERAL;
rsyserr(FERROR, errno, "change_dir %s failed", full_fname(dir));
- change_dir(orig_dir, CD_NORMAL);
+ if (dir != orig_dir)
+ change_dir(orig_dir, CD_NORMAL);
pathname = NULL;
pathname_len = 0;
return 0;
}
pathname = NULL;
pathname_len = 0;
return 0;
}
- pathname = dir;
- pathname_len = dirlen;
-
return 1;
}
return 1;
}