+ assert not isinstance(paths, str_type)
+ for path in paths:
+ try:
+ pst = xstat.lstat(path)
+ if stat.S_ISLNK(pst.st_mode):
+ yield (path, pst)
+ continue
+ except OSError as e:
+ add_error('recursive_dirlist: %s' % e)
+ continue
+ try:
+ opened_pfile = finalized_fd(path)
+ except OSError as e:
+ add_error(e)
+ continue
+ with opened_pfile as pfile:
+ pst = xstat.fstat(pfile)
+ if xdev:
+ xdev = pst.st_dev
+ else:
+ xdev = None
+ if stat.S_ISDIR(pst.st_mode):
+ os.fchdir(pfile)
+ prepend = os.path.join(path, b'')
+ for i in _recursive_dirlist(prepend=prepend, xdev=xdev,
+ bup_dir=bup_dir,
+ excluded_paths=excluded_paths,
+ exclude_rxs=exclude_rxs,
+ xdev_exceptions=xdev_exceptions):
+ yield i
+ os.fchdir(startdir)
+ else:
+ prepend = path
+ yield (prepend,pst)