diff options
-rwxr-xr-x | dupfiles | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -198,21 +198,21 @@ class DuplicateFileFinder(object): class Dupfiles(cliapp.Application): def add_settings(self): - self.add_boolean_setting(['make-hardlinks'], - 'hardlink duplicate files to each other') - self.add_boolean_setting(['progress'], 'report progress') - self.add_boolean_setting(['remove'], - 'remove all but one copy of identical files') + self.settings.boolean(['make-hardlinks'], + 'hardlink duplicate files to each other') + self.settings.boolean(['progress'], 'report progress') + self.settings.boolean(['remove'], + 'remove all but one copy of identical files') def process_args(self, args): - dupfinder = DuplicateFileFinder(self['progress']) + dupfinder = DuplicateFileFinder(self.settings['progress']) for dirname in sorted(args): dupfinder.collect(dirname) for duplicates in dupfinder.duplicates(): - if self['make-hardlinks']: + if self.settings['make-hardlinks']: self.make_hardlinks(duplicates) - elif self['remove']: + elif self.settings['remove']: self.remove_all_but_one(duplicates) else: self.report(duplicates) |