Tweaked error reporting (close #109)

This commit is contained in:
Paweł Jastrzębski
2014-08-24 09:56:59 +02:00
parent 56f23ab488
commit 715ada328f
2 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -871,7 +871,7 @@ def detectCorruption(tmpPath, orgPath):
for name in files:
if getImageFileName(name) is not None:
path = os.path.join(root, name)
pathOrg = os.path.join(orgPath, name)
pathOrg = orgPath + path.split('OEBPS' + os.path.sep + 'Images')[1]
if os.path.getsize(path) == 0:
rmtree(os.path.join(tmpPath, '..', '..'), True)
raise RuntimeError('Image file %s is corrupted.' % pathOrg)