diff options
-rwxr-xr-x | dupfiles | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -249,8 +249,11 @@ class Dupfiles(cliapp.Application): same = [x for x, y in dups if y == meta] dups = [(x,y) for x, y in dups if y != meta] for pathname in same: - os.remove(pathname) - os.link(canonical, pathname) + if self.settings['no-act']: + self.output.write('hardlink %s\n' % pathname) + else: + os.remove(pathname) + os.link(canonical, pathname) def remove_all_but_one(self, duplicates, last_dir): if not last_dir.endswith(os.sep): |