Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Commit

Permalink
Fix a bug with getZFSRelativePath, make sure we have a '/' at the start
Browse files Browse the repository at this point in the history
of the pathname
  • Loading branch information
Kris Moore committed Nov 7, 2013
1 parent 1fffaad commit 8afc51a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src-sh/libsh/functions.sh
Expand Up @@ -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
}
Expand Down

0 comments on commit 8afc51a

Please sign in to comment.