[#122 state:fixed] Fixed crash on scanning when file is being deleted during the scan.

This commit is contained in:
Virgil Dupras 2010-12-29 15:41:12 +01:00
parent f1b4db368e
commit 3a9f51b600
1 changed files with 5 additions and 1 deletions

View File

@ -113,7 +113,11 @@ class DupeGuru(RegistrableApplication, Broadcaster):
seen_inodes = set()
result = []
for file in files:
inode = io.stat(file.path).st_ino
try:
inode = io.stat(file.path).st_ino
except OSError:
# The file was probably deleted or something
continue
if inode not in seen_inodes:
seen_inodes.add(inode)
result.append(file)