From 6c262d20d79e5201103959c9f342ae068e64f054 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sat, 18 Dec 2021 19:31:21 -0500 Subject: [PATCH 1/6] Attempt fix for unzipping server dir --- app/classes/shared/main_controller.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/classes/shared/main_controller.py b/app/classes/shared/main_controller.py index 11edcf2f..14f0da70 100644 --- a/app/classes/shared/main_controller.py +++ b/app/classes/shared/main_controller.py @@ -319,8 +319,11 @@ class Controller: path_list = test.split('/') root_path = path_list[0] if len(path_list) > 1: - for i in range(len(path_list)-2): - root_path = os.path.join(root_path, path_list[i+1]) + for i in range(len(path_list)-1): + try: + root_path = os.path.join(root_path, path_list[i+1]) + except: + root_path = root_path full_root_path = os.path.join(tempDir, root_path) From e53da60b4f9563c2f90dd4bc8d5641581e5ccdcd Mon Sep 17 00:00:00 2001 From: Andrew Date: Mon, 20 Dec 2021 12:51:27 -0500 Subject: [PATCH 2/6] Make files tree show up on page load --- app/frontend/templates/panel/server_files.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/frontend/templates/panel/server_files.html b/app/frontend/templates/panel/server_files.html index 3f16e8c2..377a7355 100644 --- a/app/frontend/templates/panel/server_files.html +++ b/app/frontend/templates/panel/server_files.html @@ -139,7 +139,7 @@ {{ translate('serverFiles', 'files', data['lang']) }} -