summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/functions7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/functions b/scripts/functions
index b3b216a..d110f4d 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -249,10 +249,11 @@ CT_DoForceRmdir() {
local mode
for dir in "${@}"; do
[ -d "${dir}" ] || continue
- mode="$(stat -c '%a' "${dir}")"
- CT_DoExecLog ALL chmod -R u+w "$(dirname "${dir}")"
+ mode="$(stat -c '%a' "$(dirname "${dir}")")"
+ CT_DoExecLog ALL chmod u+w "$(dirname "${dir}")"
+ CT_DoExecLog ALL chmod -R u+w "${dir}"
CT_DoExecLog ALL rm -rf "${dir}"
- CT_DoExecLog ALL chmod -R ${mode} "$(dirname "${dir}")"
+ CT_DoExecLog ALL chmod ${mode} "$(dirname "${dir}")"
done
}