summaryrefslogtreecommitdiff
path: root/src/librefetch
diff options
context:
space:
mode:
Diffstat (limited to 'src/librefetch')
-rwxr-xr-xsrc/librefetch/librefetch6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/librefetch/librefetch b/src/librefetch/librefetch
index 61fc3ad..a477315 100755
--- a/src/librefetch/librefetch
+++ b/src/librefetch/librefetch
@@ -151,8 +151,10 @@ main() {
fi
local dlcmd="${DOWNLOADER}"
- dlcmd="${dlcmd//\%o/\"$dst\"}"
- dlcmd="${dlcmd//\%u/\"$src\"}"
+ [[ $dlcmd = *%u* ]] || dlcmd="$dlcmd %u"
+ dlcmd="${dlcmd//\%o/$(printf '%q' "$dst")}"
+ dlcmd="${dlcmd//\%u/$(printf '%q' "$src")}"
+
{ eval "$dlcmd"; } >> /dev/stderr && return 0
fi