Permalink
Browse files

Backport a fix to get ZFS relative path

  • Loading branch information...
1 parent 0e61329 commit 02d7a8693e88d6e5f75fb43c0b1203904427ab9e @kmoore134 kmoore134 committed Nov 7, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 src-sh/libsh/functions.sh
View
4 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
}

0 comments on commit 02d7a86

Please sign in to comment.