- in_file = os.path.join (in_dir, f)
- if find_files_re.match (f):
- found_files.append (in_file)
- if os.path.islink (in_file): # all symlinks are assumed to be relative and to point to files in the input trees
- link_path = new_link_path (os.path.normpath (os.readlink (in_file)), in_dir, do_strip_dir_names_re)
- for t in target_dirs:
- os.symlink (link_path, os.path.join (t, out_dir, f))
- elif process_files_re.match (f):
- for t in target_dirs:
- os.link (in_file, os.path.join (t, out_dir, f))
- return found_files
+ p = os.path.join (current_dir, f)
+ if os.path.islink (p):
+ symlinks_paths.append (p)
+ elif find_files_re.match (f):
+ files_paths.append (p)
+ return (dirs_paths, symlinks_paths, files_paths)