diff options
author | Lars Wirzenius <liw@liw.fi> | 2012-03-12 19:16:39 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2012-03-12 19:16:39 +0000 |
commit | 35d9f629b02cb6a3d16e6a132261f3386ed868d8 (patch) | |
tree | 79b66b3dc8d09f78e50e0beeee0315317bdb116e /dupfiles | |
parent | 06499854f13ef086f8a374e92d1b7f8dfa03158c (diff) | |
download | dupfiles-35d9f629b02cb6a3d16e6a132261f3386ed868d8.tar.gz |
Fix checking for size
Diffstat (limited to 'dupfiles')
-rwxr-xr-x | dupfiles | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -102,9 +102,9 @@ class DuplicateFileFinder(object): for pathname in pathnames: ts['filename'] = pathname st = os.lstat(pathname) - if stat.S_ISREG(st.st_mode): + if stat.S_ISREG(st.st_mode) and self.size_ok(st.st_size): t = (st.st_dev, st.st_ino, pathname) - if self.size_ok(st.st_size) and st.st_size in self.by_size: + if st.st_size in self.by_size: self.by_size[st.st_size].append(t) else: self.by_size[st.st_size] = [t] |