mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix winutil import not being run when CALIBRE_CONFIG_DIRECTORY is set
This commit is contained in:
parent
17e6846cbe
commit
448b90425a
@ -287,6 +287,8 @@ class ExtensionsImporter:
|
|||||||
|
|
||||||
sys.meta_path.insert(0, DeVendor())
|
sys.meta_path.insert(0, DeVendor())
|
||||||
sys.meta_path.append(ExtensionsImporter())
|
sys.meta_path.append(ExtensionsImporter())
|
||||||
|
if iswindows:
|
||||||
|
from calibre_extensions import winutil
|
||||||
|
|
||||||
|
|
||||||
class Plugins(collections.Mapping):
|
class Plugins(collections.Mapping):
|
||||||
@ -332,7 +334,6 @@ cconfd = getenv('CALIBRE_CONFIG_DIRECTORY')
|
|||||||
if cconfd is not None:
|
if cconfd is not None:
|
||||||
config_dir = os.path.abspath(cconfd)
|
config_dir = os.path.abspath(cconfd)
|
||||||
elif iswindows:
|
elif iswindows:
|
||||||
from calibre_extensions import winutil
|
|
||||||
try:
|
try:
|
||||||
config_dir = winutil.special_folder_path(winutil.CSIDL_APPDATA)
|
config_dir = winutil.special_folder_path(winutil.CSIDL_APPDATA)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user