Merge pull request #690 from stilor/fix-empty-symlinks

Avoid creating symlinks with empty prefix
This commit is contained in:
Alexey Neyman 2017-04-13 08:43:42 -07:00 committed by GitHub
commit 368a0169a2

View File

@ -1795,7 +1795,7 @@ CT_SymlinkTools()
# No matching files
break
fi
if [ "${newpfx}" != "${CT_TARGET}" -o "${bindir}" != "${srcdir}" ]; then
if [ -n "${newpfx}" -a \( "${newpfx}" != "${CT_TARGET}" -o "${bindir}" != "${srcdir}" \) ]; then
_t="${newpfx}-${t#${CT_TARGET}-}"
CT_DoExecLog ALL ln -sfv "${dirpfx}${t}" "${bindir}/${_t}"
fi