This commit is contained in:
St.Huang 2018-07-14 22:03:58 +08:00
parent 5b511de9e7
commit a48118331c
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ def defaultBase():
return os.path.join(loc, "Anki")
'''
path = mw.pm.addonFolder()
return path[:path.rindex(os.path.sep)]
return os.path.dirname(os.path.abspath(path))
headers = {"User-Agent": "AnkiHub"}

View File

@ -74,7 +74,7 @@ class ServiceManager(object):
"""
service_path = u'dict'
web_services, local_custom_services = list(), list()
mypath = os.path.dirname(os.path.realpath(__file__)) + os.path.sep + service_path
mypath = os.path.join(os.path.dirname(os.path.realpath(__file__)), service_path)
files = [f for f in os.listdir(mypath)
if f not in ('__init__.py') and not f.endswith('.pyc') and not os.path.isdir(mypath+os.sep+f)]
base_class = (WebService, LocalService,