summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2026-07-22 13:34:12 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2026-07-22 13:34:12 -0700
commite8dd6675811f3e16685e6ae62644e91239a300ec (patch)
tree5a1dfcdbfc8b0f64841eb913df1d30b2b695fcf3
parentf0fc318169577f5d84d0de4e26cc11a3713f1784 (diff)
downloadbackomp-e8dd6675811f3e16685e6ae62644e91239a300ec.tar.gz
backomp-e8dd6675811f3e16685e6ae62644e91239a300ec.tar.xz
more flexible path construction
-rwxr-xr-xbackomp4
1 files changed, 3 insertions, 1 deletions
diff --git a/backomp b/backomp
index e45eff8..69ac1ca 100755
--- a/backomp
+++ b/backomp
@@ -379,7 +379,9 @@ while IFS= read -r line; do
fi
src="${f2}"
- dest="${base_path}${base_path:+/}$(expand_opts "${f1}")"
+ dest="${base_path}"
+ [[ -n "${dest}" && "${dest}" != *[/:] ]] && dest="${dest}/"
+ dest="${dest}$(expand_opts "${f1#./}")"
tainted_dest="$?"
printf '[%d] [%s] %s => %s\n' "${bcount}" "${opts['retain']}" \
"${src}" "${dest}"