]> git.datanom.net - omvzfs.git/blobdiff - gui/rpc/zfs.inc
Fix reldirpath value when creating a shared folder.
[omvzfs.git] / gui / rpc / zfs.inc
index 84fa26d9c481f0b5c08107862bce15ec313ae5ab..af69ec4d6f7492cdc897d8be92476fbad0d68399 100644 (file)
@@ -293,7 +293,11 @@ class OMVRpcServiceZFS extends OMVRpcServiceAbstract {
                $uuid = OMVUtil::uuid();
                $pathName = $tmp->getMountPoint();
                $subdirs = preg_split('/\//',$pathName);
-               $reldirpath = $subdirs[count($subdirs)-1];
+               $reldirpath = "";
+               for ($i=2;$i<count($subdirs);$i++) {
+                       $reldirpath .= $subdirs[$i] . "/";
+               }
+               $reldirpath = rtrim($reldirpath, "/");
                $object = array(
                        "uuid" => $uuid,
                        "name" => $params['sharename'],
This page took 0.244295 seconds and 5 git commands to generate.