From db4a15531c934ba46ef170dfecf8bf7edd73b0c0 Mon Sep 17 00:00:00 2001 From: Daniel Ruthardt Date: Fri, 14 Nov 2025 12:29:20 +0100 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=90=9B=20Fix=20quoting=20issue=20foun?= =?UTF-8?q?d=20thanks=20to=20testing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/file/copy_owners | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libs/file/copy_owners b/libs/file/copy_owners index c2bf1b1..1aa2fbe 100644 --- a/libs/file/copy_owners +++ b/libs/file/copy_owners @@ -48,6 +48,10 @@ function file::copy_owners() { local user; user=$(stat -c '%U' "$source") local group; group=$(stat -c '%G' "$source") - [[ "$recursive" == "true" ]] && local options="-R" - sudo chown "${options:-}" "$user:$group" "$destination" + local command="sudo chown" + if [[ "$recursive" == "true" ]]; then + command+=" -R" + fi + + $command "$user:$group" "$destination" } From 57efbcdf8f89fa16bfbade573f62145cf03af666 Mon Sep 17 00:00:00 2001 From: Daniel Ruthardt Date: Fri, 14 Nov 2025 12:43:48 +0100 Subject: [PATCH 2/2] Update libs/file/copy_owners Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- libs/file/copy_owners | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/file/copy_owners b/libs/file/copy_owners index 1aa2fbe..db99bc6 100644 --- a/libs/file/copy_owners +++ b/libs/file/copy_owners @@ -48,10 +48,10 @@ function file::copy_owners() { local user; user=$(stat -c '%U' "$source") local group; group=$(stat -c '%G' "$source") - local command="sudo chown" + local command=(sudo chown) if [[ "$recursive" == "true" ]]; then - command+=" -R" + command+=(-R) fi - $command "$user:$group" "$destination" + "${command[@]}" "$user:$group" "$destination" }