summaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorAAGaming <aagaming@riseup.net>2023-09-30 13:15:35 -0400
committermarios8543 <marios8543@gmail.com>2023-10-17 17:08:23 +0300
commit949244e8e6b54921beeefab3524c2de63914f737 (patch)
tree0393a4e17c2a47783d40c891a9ee09f7b78cc2ba /backend
parentb7d4d57bc28449c33191a942c0bcffbe15226f04 (diff)
downloaddecky-loader-949244e8e6b54921beeefab3524c2de63914f737.tar.gz
decky-loader-949244e8e6b54921beeefab3524c2de63914f737.zip
fix paths
Diffstat (limited to 'backend')
-rw-r--r--backend/src/loader.py4
-rw-r--r--backend/src/main.py2
-rw-r--r--backend/src/updater.py3
-rw-r--r--backend/src/utilities.py2
4 files changed, 6 insertions, 5 deletions
diff --git a/backend/src/loader.py b/backend/src/loader.py
index 684570f7..e59cbcaf 100644
--- a/backend/src/loader.py
+++ b/backend/src/loader.py
@@ -107,13 +107,13 @@ class Loader:
self.watcher.disabled = False
async def handle_frontend_assets(self, request: web.Request):
- file = path.join(path.dirname(__file__), "static", request.match_info["path"])
+ file = path.join(path.dirname(__file__), "..", "static", request.match_info["path"])
return web.FileResponse(file, headers={"Cache-Control": "no-cache"})
async def handle_frontend_locales(self, request: web.Request):
req_lang = request.match_info["path"]
- file = path.join(path.dirname(__file__), "locales", req_lang)
+ file = path.join(path.dirname(__file__), "..", "locales", req_lang)
if exists(file):
return web.FileResponse(file, headers={"Cache-Control": "no-cache", "Content-Type": "application/json"})
else:
diff --git a/backend/src/main.py b/backend/src/main.py
index 793d000c..83a4b997 100644
--- a/backend/src/main.py
+++ b/backend/src/main.py
@@ -86,7 +86,7 @@ class PluginManager:
for route in list(self.web_app.router.routes()):
self.cors.add(route) # type: ignore
- self.web_app.add_routes([static("/static", path.join(path.dirname(__file__), 'static'))])
+ self.web_app.add_routes([static("/static", path.join(path.dirname(__file__), '..', 'static'))])
self.web_app.add_routes([static("/legacy", path.join(path.dirname(__file__), 'legacy'))])
def exception_handler(self, loop: AbstractEventLoop, context: Dict[str, str]):
diff --git a/backend/src/updater.py b/backend/src/updater.py
index ac7c78d8..d28e67b0 100644
--- a/backend/src/updater.py
+++ b/backend/src/updater.py
@@ -1,3 +1,4 @@
+from __future__ import annotations
import os
import shutil
from asyncio import sleep
@@ -11,7 +12,7 @@ from .localplatform import chmod, service_restart, ON_LINUX, get_keep_systemd_se
from aiohttp import ClientSession, web
-from .import helpers
+from . import helpers
from .injector import get_gamepadui_tab
from .settings import SettingsManager
diff --git a/backend/src/utilities.py b/backend/src/utilities.py
index 3c7c8c2e..b0e23b88 100644
--- a/backend/src/utilities.py
+++ b/backend/src/utilities.py
@@ -19,7 +19,7 @@ if TYPE_CHECKING:
from .main import PluginManager
from .injector import inject_to_tab, get_gamepadui_tab, close_old_tabs, get_tab
from .localplatform import ON_WINDOWS
-from .import helpers
+from . import helpers
from .localplatform import service_stop, service_start, get_home_path, get_username
class FilePickerObj(TypedDict):