diff --git a/kcc/KCC_gui.py b/kcc/KCC_gui.py index 9ddace4..dd5af7c 100644 --- a/kcc/KCC_gui.py +++ b/kcc/KCC_gui.py @@ -365,6 +365,12 @@ class WorkerThread(QtCore.QThread): MW.progressBarTick.emit('tick') self.workerOutput.append(output) + def sanitizeTrace(self, traceback): + return ''.join(format_tb(traceback))\ + .replace('C:\\Users\\AcidWeb\\Documents\\Projekty\\KCC\\', '')\ + .replace('C:\\Python34\\', '')\ + .replace('C:\\Python34_64\\', '') + def run(self): MW.modeConvert.emit(0) @@ -462,7 +468,7 @@ class WorkerThread(QtCore.QThread): self.errors = True _, _, traceback = sys.exc_info() MW.showDialog.emit("Error during conversion %s:\n\n%s\n\nTraceback:\n%s" - % (jobargv[-1], str(err), "".join(format_tb(traceback))), 'error') + % (jobargv[-1], str(err), self.sanitizeTrace(traceback)), 'error') MW.addMessage.emit('Failed to create EPUB!', 'error', False) MW.addTrayMessage.emit('Failed to create EPUB!', 'Critical') if not self.conversionAlive: diff --git a/kcc/comic2ebook.py b/kcc/comic2ebook.py index 9b7e8c3..a41304f 100755 --- a/kcc/comic2ebook.py +++ b/kcc/comic2ebook.py @@ -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)