From 904702fba288da6c95044b528911966613e54935 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 20 Jan 2014 11:37:40 -0500 Subject: librefetch: fix the %u bug by deferring variable evaluation until the eval. --- src/librefetch/librefetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/librefetch/librefetch') diff --git a/src/librefetch/librefetch b/src/librefetch/librefetch index 5556ddd..443b4f6 100755 --- a/src/librefetch/librefetch +++ b/src/librefetch/librefetch @@ -158,8 +158,8 @@ main() { local dlcmd="${DOWNLOADER}" [[ $dlcmd = *%u* ]] || dlcmd="$dlcmd %u" - dlcmd="${dlcmd//\%o/$(printf '%q' "$dst")}" - dlcmd="${dlcmd//\%u/$(printf '%q' "$src")}" + dlcmd="${dlcmd//\%o/"\$dst"}" + dlcmd="${dlcmd//\%u/"\$src"}" { eval "$dlcmd"; } >&2 && return 0 fi -- cgit v1.2.2