mirror of
https://github.com/ankitects/anki.git
synced 2025-11-08 21:57:12 -05:00
fix for Open Addons Folder... failing on windows
This commit is contained in:
parent
ad5be96468
commit
8a78de45c1
1 changed files with 2 additions and 2 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
|
|
||||||
from aqt.qt import *
|
from aqt.qt import *
|
||||||
import re, os, sys, urllib, time
|
import re, os, sys, urllib, time, subprocess
|
||||||
import aqt
|
import aqt
|
||||||
from anki.sound import playFromText, stripSounds
|
from anki.sound import playFromText, stripSounds
|
||||||
from anki.utils import call, isWin, isMac
|
from anki.utils import call, isWin, isMac
|
||||||
|
|
@ -329,7 +329,7 @@ def openFolder(path):
|
||||||
if isWin:
|
if isWin:
|
||||||
if isinstance(path, unicode):
|
if isinstance(path, unicode):
|
||||||
path = path.encode(sys.getfilesystemencoding())
|
path = path.encode(sys.getfilesystemencoding())
|
||||||
call(["explorer", path], wait=False)
|
subprocess.Popen(["explorer", path])
|
||||||
else:
|
else:
|
||||||
QDesktopServices.openUrl(QUrl("file://" + path))
|
QDesktopServices.openUrl(QUrl("file://" + path))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue