Skip to content

Commit a8dc394

Browse files
committed
Revert "Revert "Support for local unrar installation through an environment variable.""
This reverts commit a281b5b.
1 parent 8b1c653 commit a8dc394

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

comics/utils/comicfilehandler.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ class ComicFileHandler(object):
1313

1414
def __init__(self):
1515
# Set the unrar tool based on filesystem
16-
if sys.platform == 'win32': # Windows
16+
if os.getenv('TENMA_UNRAR_PATH'):
17+
rarfile.UNRAR_TOOL = os.getenv('TENMA_UNRAR_PATH')
18+
elif sys.platform == 'win32': # Windows
1719
rarfile.UNRAR_TOOL = os.path.dirname(comics.__file__) + "/utils/unrar/unrar.exe"
1820
elif sys.platform == 'darwin': # Mac
1921
rarfile.UNRAR_TOOL = os.path.dirname(comics.__file__) + "/utils/unrar/unrar_mac"

0 commit comments

Comments
 (0)