From e8dd6675811f3e16685e6ae62644e91239a300ec Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Wed, 22 Jul 2026 13:34:12 -0700 Subject: more flexible path construction --- backomp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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}" -- cgit v1.3.1