From 8afc51a15ac728d3fded3c054141c9ee87cc0269 Mon Sep 17 00:00:00 2001 From: Kris Moore Date: Thu, 7 Nov 2013 13:11:37 -0500 Subject: [PATCH] Fix a bug with getZFSRelativePath, make sure we have a '/' at the start of the pathname --- src-sh/libsh/functions.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src-sh/libsh/functions.sh b/src-sh/libsh/functions.sh index 9a0a1cd1f..2fb669156 100755 --- a/src-sh/libsh/functions.sh +++ b/src-sh/libsh/functions.sh @@ -426,6 +426,10 @@ getZFSRelativePath() { if [ -z "${_tank}" ] ; then return 1 ; fi local _name="${_chkDir#${_mp}}" + + # Make sure we have a '/' at the start of dataset + if [ "`echo ${_name} | cut -c 1`" != "/" ] ; then _name="/${_name}"; fi + echo "${_name}" return 0 }