From 0424441605c2373a545b014426f88a1ea801c16b Mon Sep 17 00:00:00 2001 From: ash-iir <254348575+ash-iir@users.noreply.github.com> Date: Thu, 19 Nov 2026 11:38:33 +0000 Subject: [PATCH 1/7] helper: overview backups size with toybox du toybox du has no -B, so du -s -B1 printed nothing and backups_size was always 0. Use du -sk and multiply, as the other size checks already do. Signed-off-by: ash-iir <254348575+ash-iir@users.noreply.github.com> (cherry picked from commit 7da82e95c8b2688acc5346f35ff8bfeb37014159) --- module/scripts/helper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/scripts/helper.sh b/module/scripts/helper.sh index ec3518e..d95eff6 100644 --- a/module/scripts/helper.sh +++ b/module/scripts/helper.sh @@ -982,7 +982,7 @@ EOF done paths=0; for d in "$bk"/.paths/*/; do [ -d "$d" ] && paths=$(( paths + 1 )); done jobs=0; for f in "$STATE/jobs"/*.json; do [ -f "$f" ] && jobs=$(( jobs + 1 )); done - size=0; if [ -d "$bk" ]; then size="$(du -s -B1 "$bk" 2>/dev/null | cut -f1)"; case "$size" in ''|*[!0-9]*) size=0 ;; esac; fi + size=0; if [ -d "$bk" ]; then size="$(du -sk "$bk" 2>/dev/null | cut -f1)"; case "$size" in ''|*[!0-9]*) size=0 ;; esac; size=$((size * 1024)); fi # toybox du: -k, no -B _dfp="$bk"; [ -d "$_dfp" ] || _dfp="/data/media/$u"; [ -d "$_dfp" ] || _dfp=/data free=0; total=0 set -- $(df -kP "$_dfp" 2>/dev/null | tail -1) From 527867f874a97e6cc795abe4c2a0cee7451866e6 Mon Sep 17 00:00:00 2001 From: ash-iir <254348575+ash-iir@users.noreply.github.com> Date: Thu, 19 Nov 2026 11:40:21 +0000 Subject: [PATCH 2/7] webui: show why a delete failed remote-del, dest-del and schedule-delete ignored the helper result, so a refused delete (e.g. ERR_DEST_HAS_BACKUPS) looked like nothing happened. Show errMsg(r) like the other actions, and add msg_err_dest_has_backups. Signed-off-by: ash-iir <254348575+ash-iir@users.noreply.github.com> (cherry picked from commit dd7a2e882ff34f242336d5a3ac38746b7f4074a3) --- module/webroot/lang/en.js | 1 + module/webroot/lang/en.json | 1 + module/webroot/scripts.js | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/module/webroot/lang/en.js b/module/webroot/lang/en.js index 55a0012..6d0fb7e 100644 --- a/module/webroot/lang/en.js +++ b/module/webroot/lang/en.js @@ -70,6 +70,7 @@ window.__I18N_EN = { "dest_fail": "unreachable", "confirm_delete": "Delete ${name}?", "backup": "Back up", + "msg_err_dest_has_backups": "This destination still holds backups. Move or delete them first.", "msg_err_crypto_pass": "This backup is encrypted. Enter its passphrase.", "msg_err_crypto_unavail": "Encryption is unavailable on this device: a required bundled binary is missing. Reinstall or update VDBackup, then try again.", "msg_restore_passphrase": "${name} is encrypted. Enter the passphrase to restore it.", diff --git a/module/webroot/lang/en.json b/module/webroot/lang/en.json index c90feb0..0237876 100644 --- a/module/webroot/lang/en.json +++ b/module/webroot/lang/en.json @@ -45,6 +45,7 @@ "dest_fail": "unreachable", "confirm_delete": "Delete ${name}?", "backup": "Back up", + "msg_err_dest_has_backups": "This destination still holds backups. Move or delete them first.", "msg_err_crypto_pass": "This backup is encrypted. Enter its passphrase.", "msg_err_crypto_unavail": "Encryption is unavailable on this device: a required bundled binary is missing. Reinstall or update VDBackup, then try again.", "msg_restore_passphrase": "${name} is encrypted. Enter the passphrase to restore it.", diff --git a/module/webroot/scripts.js b/module/webroot/scripts.js index 9532a0a..d7bf55d 100644 --- a/module/webroot/scripts.js +++ b/module/webroot/scripts.js @@ -1015,7 +1015,7 @@ function cancelAuthorize() { function delRemote(name) { modalConfirm(I18N.t("confirm_delete", { name: name })).then(function (ok) { if (!ok) return; - helper("remote-del", { name: name }).then(loadRemotes); + helper("remote-del", { name: name }).then(function (r) { if (!r || !r.ok) modalAlert(errMsg(r)); loadRemotes(); }); }); } // Populate a