diff --git a/CHANGELOG.md b/CHANGELOG.md
index cc64adc8..79d05990 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,9 +3,11 @@
### New features
TBD
### Bug fixes
-TBD
+- Fix bug where trying to reconfigure unloaded server would stack ([Commit](https://gitlab.com/crafty-controller/crafty-4/-/commit/1b2fef06fb3b02b76c9506caf7e07e932df95fab))
+- Fix traceback error when a user click the roles config tab while already on the roles config page; **this is for new role creation only** ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/452))
+- Fix logic issue when removing items from backup exclusions ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/453))
### Tweaks
-TBD
+- Add button to scroll to bottom of vterm ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/454))
### Lang
TBD
diff --git a/app/classes/shared/file_helpers.py b/app/classes/shared/file_helpers.py
index 28edbef7..82b5a560 100644
--- a/app/classes/shared/file_helpers.py
+++ b/app/classes/shared/file_helpers.py
@@ -226,18 +226,24 @@ class FileHelpers:
comment, "utf-8"
) # comments over 65535 bytes will be truncated
for root, dirs, files in os.walk(path_to_zip, topdown=True):
- for l_dir in dirs:
+ for l_dir in dirs[:]:
+ # make all paths in exclusions a unix style slash
+ # to match directories.
if str(os.path.join(root, l_dir)).replace("\\", "/") in ex_replace:
dirs.remove(l_dir)
ziproot = path_to_zip
+ # iterate through list of files
for file in files:
+ # check if file/dir is in exclusions list.
+ # Only proceed if not exluded.
if (
str(os.path.join(root, file)).replace("\\", "/")
not in ex_replace
and file != "crafty.sqlite"
):
try:
- logger.info(f"backing up: {os.path.join(root, file)}")
+ logger.debug(f"backing up: {os.path.join(root, file)}")
+ # add trailing slash to zip root dir if not windows.
if os.name == "nt":
zip_file.write(
os.path.join(root, file),
@@ -254,12 +260,20 @@ class FileHelpers:
f"Error backing up: {os.path.join(root, file)}!"
f" - Error was: {e}"
)
+ # debug logging for exlusions list
+ else:
+ logger.debug(f"Found {file} in exclusion list. Skipping...")
+
+ # add current file bytes to total bytes.
total_bytes += os.path.getsize(os.path.join(root, file))
+ # calcualte percentage based off total size and current archive size
percent = round((total_bytes / dir_bytes) * 100, 2)
+ # package results
results = {
"percent": percent,
"total_files": self.helper.human_readable_file_size(dir_bytes),
}
+ # send status results to page.
self.helper.websocket_helper.broadcast_page_params(
"/panel/server_detail",
{"id": str(server_id)},
diff --git a/app/frontend/templates/panel/panel_edit_role.html b/app/frontend/templates/panel/panel_edit_role.html
index 86ee953a..79751791 100644
--- a/app/frontend/templates/panel/panel_edit_role.html
+++ b/app/frontend/templates/panel/panel_edit_role.html
@@ -39,7 +39,7 @@