vzctl destroy: fix rare off-by-one error in get_destroy_root()

In case VE_PRIVATE is a separate file system (say you mount
/dev/sda3 to /vz/private/333), or VE_PRIVATE is a symlink to
a directory on another filesystem (like
/vz/private/333 -> /otherdir/333), function get_destroy_root()
should return the same path it is given. Now it cuts the last
character as shown below:

$ ls -l /vz/private/801
lrwxrwxrwx 1 root root 13 May 12 20:43 /vz/private/801 -> /otherdir/801

Destroying container private area: /vz/private/801
Can't create tmp dir /vz/private/80/vztmp: No such file or directory

Fix it.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
1 file changed