mirror of
https://github.com/fishyboteso/fishyboteso.git
synced 2024-08-30 18:32:13 +00:00
better method for getting documents folder
This commit is contained in:
parent
21065e55ee
commit
f6af3311da
@ -136,8 +136,10 @@ def check_addon(name):
|
|||||||
Extracts the addon from zip and installs it into the AddOn folder of eso
|
Extracts the addon from zip and installs it into the AddOn folder of eso
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
user = os.path.expanduser("~")
|
# noinspection PyUnresolvedReferences
|
||||||
addon_dir = os.path.join(user, "Documents", "Elder Scrolls Online", "live", "Addons")
|
from win32com.shell import shell, shellcon
|
||||||
|
documents = shell.SHGetFolderPath(0, shellcon.CSIDL_PERSONAL, None, 0)
|
||||||
|
addon_dir = os.path.join(documents, "Elder Scrolls Online", "live", "Addons")
|
||||||
if not os.path.exists(os.path.join(addon_dir, name)):
|
if not os.path.exists(os.path.join(addon_dir, name)):
|
||||||
logging.info(f"{name} Addon not found, installing it...")
|
logging.info(f"{name} Addon not found, installing it...")
|
||||||
with ZipFile(manifest_file(f"{name}.zip"), 'r') as z:
|
with ZipFile(manifest_file(f"{name}.zip"), 'r') as z:
|
||||||
|
Loading…
Reference in New Issue
Block a user