if (is_dot_dir) {
STRUCT_STAT st;
- if (link_stat(fbuf, &st, copy_dirlinks) != 0) {
+ if (link_stat(fbuf, &st, 1) != 0) {
io_error |= IOERR_GENERAL;
rsyserr(FERROR, errno, "link_stat %s failed",
full_fname(fbuf));
if (fn != fbuf)
memmove(fbuf, fn, len + 1);
- if (link_stat(fbuf, &st, copy_dirlinks) != 0) {
+ if (link_stat(fbuf, &st, copy_dirlinks || is_dot_dir) != 0) {
io_error |= IOERR_GENERAL;
rsyserr(FERROR, errno, "link_stat %s failed",
full_fname(fbuf));