From b7e586a73bd0445dc074c00b50febafa2c6717b4 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 26 Jul 2020 17:22:58 +0200 Subject: [PATCH] Prevent double slash in link --- conf/haste.sh | 2 +- scripts/install | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/haste.sh b/conf/haste.sh index d54aa41..d3e8798 100644 --- a/conf/haste.sh +++ b/conf/haste.sh @@ -24,7 +24,7 @@ paste_data() { 2>/dev/null) [[ -z "$key" ]] && _die "Unable to parse the server response." - echo "${PASTE_URL}${key}" + echo "${PASTE_URL}/${key}" } usage() { diff --git a/scripts/install b/scripts/install index 49f7f35..51326d3 100755 --- a/scripts/install +++ b/scripts/install @@ -144,7 +144,7 @@ ynh_replace_string --match_string="jquery.min.js" --replace_string="https://ajax # ADD HASTE AS A BINARY FILE #================================================= -ynh_replace_string --match_string="__YNH_HASTE_URL__" --replace_string="${domain}${path_url}" --target_file="../conf/haste.sh" +ynh_replace_string --match_string="__YNH_HASTE_URL__" --replace_string="${domain}${path_url%/}" --target_file="../conf/haste.sh" ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="../conf/haste.sh" cp ../conf/haste.sh /usr/bin/$app