mirror of
https://github.com/ciromattia/kcc
synced 2026-10-09 11:02:31 +00:00
Fixed unrar detection
This commit is contained in:
@@ -1009,7 +1009,7 @@ class KCCGUI(KCC_ui.Ui_mainWindow):
|
|||||||
'info')
|
'info')
|
||||||
rarExitCode = Popen('unrar', stdout=PIPE, stderr=STDOUT, stdin=PIPE, shell=True)
|
rarExitCode = Popen('unrar', stdout=PIPE, stderr=STDOUT, stdin=PIPE, shell=True)
|
||||||
rarExitCode = rarExitCode.wait()
|
rarExitCode = rarExitCode.wait()
|
||||||
if rarExitCode == 0 or rarExitCode == 7:
|
if rarExitCode == 0 or rarExitCode == 1 or rarExitCode == 7:
|
||||||
self.UnRAR = True
|
self.UnRAR = True
|
||||||
else:
|
else:
|
||||||
self.UnRAR = False
|
self.UnRAR = False
|
||||||
|
|||||||
@@ -1056,7 +1056,7 @@ def checkTools(source):
|
|||||||
if source.endswith('.CBR') or source.endswith('.RAR'):
|
if source.endswith('.CBR') or source.endswith('.RAR'):
|
||||||
rarExitCode = Popen('unrar', stdout=PIPE, stderr=STDOUT, stdin=PIPE, shell=True)
|
rarExitCode = Popen('unrar', stdout=PIPE, stderr=STDOUT, stdin=PIPE, shell=True)
|
||||||
rarExitCode = rarExitCode.wait()
|
rarExitCode = rarExitCode.wait()
|
||||||
if rarExitCode != 0 and rarExitCode != 7:
|
if rarExitCode != 0 and rarExitCode != 1 and rarExitCode != 7:
|
||||||
print('ERROR: UnRAR is missing!')
|
print('ERROR: UnRAR is missing!')
|
||||||
exit(1)
|
exit(1)
|
||||||
elif source.endswith('.CB7') or source.endswith('.7Z'):
|
elif source.endswith('.CB7') or source.endswith('.7Z'):
|
||||||
|
|||||||
Reference in New Issue
Block a user