mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-21 13:53:15 -07:00
Merge pull request #39 from SerhatG/master
Mailing sometimes failed because of non-escaped slashes
This commit is contained in:
commit
30ac4f6fed
1 changed files with 2 additions and 2 deletions
|
@ -160,9 +160,9 @@ replaceVarBy() {
|
||||||
|
|
||||||
# If we're not using Bash use sed, as we need to support as much as systems possible, also those running sh/dash etc
|
# If we're not using Bash use sed, as we need to support as much as systems possible, also those running sh/dash etc
|
||||||
if [ -n "${BASH_VERSION}" ]; then
|
if [ -n "${BASH_VERSION}" ]; then
|
||||||
REPLACEDRESULT="${1/${2}/${3}}"
|
REPLACEDRESULT="${1/${2}/${3##*/}}" # get last part after slash for paths
|
||||||
else
|
else
|
||||||
REPLACEDRESULT=$(echo "${1}" | sed "s/${2}/${3}/")
|
REPLACEDRESULT=$(echo "${1}" | sed "s/${2}/${3##*/}/") # get last part after slash for paths
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$Debug" = "yes" ]; then echo "[DETAIL] Post-Process: replace result: ${REPLACEDRESULT}" ; fi
|
if [ "$Debug" = "yes" ]; then echo "[DETAIL] Post-Process: replace result: ${REPLACEDRESULT}" ; fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue