From a48118331cf57703863fd18df0df32d7eecdb653 Mon Sep 17 00:00:00 2001 From: "St.Huang" Date: Sat, 14 Jul 2018 22:03:58 +0800 Subject: [PATCH] changes --- src/fastwq/libs/ankihub.py | 2 +- src/fastwq/service/manager.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fastwq/libs/ankihub.py b/src/fastwq/libs/ankihub.py index 6b34d6c..d006756 100644 --- a/src/fastwq/libs/ankihub.py +++ b/src/fastwq/libs/ankihub.py @@ -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"} diff --git a/src/fastwq/service/manager.py b/src/fastwq/service/manager.py index e6c09b8..4f3d361 100644 --- a/src/fastwq/service/manager.py +++ b/src/fastwq/service/manager.py @@ -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,