Search /usr/local/lib for p7zip RAR modules. See issue #10
This commit is contained in:
parent
70fdbf8536
commit
e8dc5e853e
|
@ -1,3 +1,9 @@
|
||||||
|
1.6 (released xx.xx.2014)
|
||||||
|
|
||||||
|
* Search /usr/local/lib for p7zip RAR modules.
|
||||||
|
Closes: GH bug #10
|
||||||
|
|
||||||
|
|
||||||
1.5 (released 30.3.2014)
|
1.5 (released 30.3.2014)
|
||||||
|
|
||||||
* Fix detection of existing broken symlinks when unpacking.
|
* Fix detection of existing broken symlinks when unpacking.
|
||||||
|
|
|
@ -531,7 +531,14 @@ def p7zip_supports_rar ():
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
# Assume RAR support is compiled into the binary.
|
# Assume RAR support is compiled into the binary.
|
||||||
return True
|
return True
|
||||||
return os.path.exists('/usr/lib/p7zip/Codecs/Rar29.so')
|
# the subdirectory and codec name
|
||||||
|
codecname = 'p7zip/Codecs/Rar29.so'
|
||||||
|
# search canonical user library dirs
|
||||||
|
for libdir in ('/usr/lib', '/usr/local/lib'):
|
||||||
|
fname = os.path.join(libdir, codecname)
|
||||||
|
if os.path.exists(fname):
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
@memoized
|
@memoized
|
||||||
|
|
Loading…
Reference in New Issue