+ if (strlcpy(thisname, fname, sizeof thisname)
+ >= sizeof thisname - flist_dir_len) {
+ rprintf(FINFO, "skipping overly long name: %s\n", fname);
+ return NULL;
+ }
+ clean_fname(thisname);
+ if (sanitize_paths)
+ sanitize_path(thisname, NULL);
+
+ memset(sum, 0, SUM_LENGTH);
+
+ if (readlink_stat(thisname, &st, linkname) != 0) {
+ int save_errno = errno;
+ if (errno == ENOENT && exclude_level != NO_EXCLUDES) {
+ /* either symlink pointing nowhere or file that
+ * was removed during rsync run; see if excluded
+ * before reporting an error */
+ if (check_exclude_file(thisname, 0, exclude_level)) {
+ /* file is excluded anyway, ignore silently */
+ return NULL;
+ }
+ }
+ io_error |= IOERR_GENERAL;
+ rprintf(FERROR, "readlink %s failed: %s\n",
+ full_fname(thisname), strerror(save_errno));
+ return NULL;
+ }
+
+ /* backup.c calls us with exclude_level set to NO_EXCLUDES. */
+ if (exclude_level == NO_EXCLUDES)
+ goto skip_excludes;