Mercurial > hgrepos > FreeBSD > ports > sysutils > local-bsdtools
diff sbin/ftjail @ 561:d173161a3a0f
FIX: SC2295: expansions inside ${..} need to be quoted separately, otherwise they will match as a pattern.
All our prefixes should be without shell pattern matching (?, *, [ et al.).
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Wed, 11 Sep 2024 18:19:41 +0200 |
| parents | 3afebbaf613b |
| children | 17209ce80536 |
line wrap: on
line diff
--- a/sbin/ftjail Wed Sep 11 16:49:17 2024 +0200 +++ b/sbin/ftjail Wed Sep 11 18:19:41 2024 +0200 @@ -425,7 +425,7 @@ # # Determine the mountpoint relative to the parent mountpoint - _relative_mp="${_mp#${_rootds_mountpoint}}" + _relative_mp="${_mp#"${_rootds_mountpoint}"}" # Eventually remove a trailing slash _relative_mp="${_relative_mp%/}" # The real effective full mountpoint @@ -719,7 +719,7 @@ if [ "${_name}" = "${_name%@*}@${_snapshot_name}" ]; then echo "FOUND: $_name" # Determine the relative name of the dataset - _relative_name="${_name#${_ds_source}}" + _relative_name="${_name#"${_ds_source}"}" _relative_name="${_relative_name%@*}" echo " -> $_relative_name" if [ -z "${_relative_name}" ]; then
