summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2012-03-12 19:16:39 +0000
committerLars Wirzenius <liw@liw.fi>2012-03-12 19:16:39 +0000
commit35d9f629b02cb6a3d16e6a132261f3386ed868d8 (patch)
tree79b66b3dc8d09f78e50e0beeee0315317bdb116e
parent06499854f13ef086f8a374e92d1b7f8dfa03158c (diff)
downloaddupfiles-35d9f629b02cb6a3d16e6a132261f3386ed868d8.tar.gz
Fix checking for size
-rwxr-xr-xdupfiles4
1 files changed, 2 insertions, 2 deletions
diff --git a/dupfiles b/dupfiles
index 394b2b3..343b267 100755
--- a/dupfiles
+++ b/dupfiles
@@ -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]