#define NORMAL_NAME 0
#define SLASH_ENDING_NAME 1
#define DOTDIR_NAME 2
+#define MISSING_NAME 3
/* Starting from protocol version 26, we always use 64-bit ino_t and dev_t
* internally, even if this platform does not allow files to have 64-bit inums.
if (name_type != NORMAL_NAME) {
STRUCT_STAT st;
- if (link_stat(fbuf, &st, 1) != 0) {
+ if (name_type == MISSING_NAME)
+ memset(&st, 0, sizeof st);
+ else if (link_stat(fbuf, &st, 1) != 0) {
interpret_stat_error(fbuf, True);
continue;
}
p = fn;
} else
fn = p;
- send_implied_dirs(f, flist, fbuf, fbuf, p, flags, name_type);
+ send_implied_dirs(f, flist, fbuf, fbuf, p, flags,
+ st.st_mode == 0 ? MISSING_NAME : name_type);
if (fn == p)
continue;
}