Check if root when striping trailing slash

This commit is contained in:
polyphemus 2013-12-01 13:02:59 +01:00 committed by Olivier Mengué
parent 81c4ff1c05
commit 8c69a27543

View File

@ -568,7 +568,7 @@ _lp_shorten_path()
p="${p:0:${#p} - ${#base}}"
ret="${ret%/}" # strip trailing slash
[[ ${ret} != "/" ]] && ret="${ret%/}" # strip trailing slash
local -i len_left=$(( ${max_len} - ${#ret} - ${#base} - ${#mask} ))