Fixed asset path on Windows

This commit is contained in:
Mark Qvist 2024-03-27 15:31:38 +01:00
parent a428d4c938
commit 48908842c6
1 changed files with 3 additions and 0 deletions

View File

@ -155,6 +155,9 @@ class SidebandCore():
elif RNS.vendor.platformutils.get_platform() == "linux": elif RNS.vendor.platformutils.get_platform() == "linux":
core_path = os.path.abspath(__file__) core_path = os.path.abspath(__file__)
self.asset_dir = core_path.replace("/sideband/core.py", "/assets") self.asset_dir = core_path.replace("/sideband/core.py", "/assets")
elif RNS.vendor.platformutils.is_windows():
core_path = os.path.abspath(__file__)
self.asset_dir = core_path.replace("\\sideband\\core.py", "\\assets")
else: else:
self.asset_dir = plyer.storagepath.get_application_dir()+"/sbapp/assets" self.asset_dir = plyer.storagepath.get_application_dir()+"/sbapp/assets"