mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
Fix open addon folder
The open folder operation would break if the environment variable LD_LIBRARY_PATH was not set
This commit is contained in:
parent
6131b149da
commit
e7eaf5f378
1 changed files with 1 additions and 2 deletions
|
@ -347,8 +347,7 @@ def openFolder(path):
|
||||||
if isWin:
|
if isWin:
|
||||||
subprocess.Popen(["explorer", path])
|
subprocess.Popen(["explorer", path])
|
||||||
else:
|
else:
|
||||||
oldlpath = os.environ.get("LD_LIBRARY_PATH")
|
oldlpath = os.environ.pop("LD_LIBRARY_PATH", None)
|
||||||
del os.environ["LD_LIBRARY_PATH"]
|
|
||||||
QDesktopServices.openUrl(QUrl("file://" + path))
|
QDesktopServices.openUrl(QUrl("file://" + path))
|
||||||
if oldlpath:
|
if oldlpath:
|
||||||
os.environ["LD_LIBRARY_PATH"] = oldlpath
|
os.environ["LD_LIBRARY_PATH"] = oldlpath
|
||||||
|
|
Loading…
Reference in a new issue