Check if root when striping trailing slash
This commit is contained in:
parent
81c4ff1c05
commit
8c69a27543
@ -568,7 +568,7 @@ _lp_shorten_path()
|
|||||||
|
|
||||||
p="${p:0:${#p} - ${#base}}"
|
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} ))
|
local -i len_left=$(( ${max_len} - ${#ret} - ${#base} - ${#mask} ))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user