@@ -69,7 +69,7 @@ async def list_datasites(
6969 request : Request , server_settings : ServerSettings = Depends (get_server_settings )
7070) -> HTMLResponse :
7171 files = get_file_list (server_settings .snapshot_folder )
72- template_path = current_dir / "templates" / "datasites.html"
72+ template_path = current_dir . parent . parent / "templates" / "datasites.html"
7373 html = ""
7474 with open (template_path ) as f :
7575 html = f .read ()
@@ -137,7 +137,7 @@ async def browse_datasite(
137137
138138 if os .path .isdir (slug_path ):
139139 files = get_file_list (slug_path )
140- template_path = current_dir / "templates" / "folder.html"
140+ template_path = current_dir . parent . parent / "templates" / "folder.html"
141141 html = ""
142142 with open (template_path ) as f :
143143 html = f .read ()
@@ -189,13 +189,13 @@ async def log_event(
189189
190190@main_router .get ("/install.sh" )
191191async def install () -> FileResponse :
192- install_script = current_dir / "templates" / "install.sh"
192+ install_script = current_dir . parent . parent / "templates" / "install.sh"
193193 return FileResponse (install_script , media_type = "text/plain" )
194194
195195
196196@main_router .get ("/icon.png" )
197197async def icon () -> FileResponse :
198- icon_path = current_dir / "assets" / "icon.png"
198+ icon_path = current_dir . parent . parent / "assets" / "icon.png"
199199 return FileResponse (icon_path , media_type = "image/png" )
200200
201201
0 commit comments