Fix maximum name length in core::rename

This commit is contained in:
Matt Churchyard
2020-02-04 14:59:34 +00:00
parent 55a31bbeb2
commit 30eea9f3c1
2 changed files with 2 additions and 2 deletions

View File

@@ -25,7 +25,7 @@
# POSSIBILITY OF SUCH DAMAGE.
VERSION=1.5-devel
VERSION_INT=105008
VERSION_INT=105009
VERSION_BSD=$(uname -K)
PATH=${PATH}:/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin

View File

@@ -817,7 +817,7 @@ core::rename(){
local _new="$2"
[ -z "${_old}" -o -z "${_new}" ] && util::usage
util::check_name "${_new}" || util::err "invalid virtual machine name - '${_name}'"
util::check_name "${_new}" 46 || util::err "invalid virtual machine name - '${_name}'"
datastore::get_guest "${_new}" && util::err "directory ${VM_DS_PATH}/${_new} already exists"
datastore::get_guest "${_old}" || util::err "${_old} doesn't appear to be a valid virtual machine"