]> git.datanom.net - omvzfs.git/commitdiff
Fix reldirpath value when creating a shared folder.
authorNiclas Berglind <nb@kjam.se>
Tue, 16 Sep 2014 19:47:30 +0000 (21:47 +0200)
committerMichael Rasmussen <mir@datanom.net>
Tue, 16 Sep 2014 20:30:24 +0000 (22:30 +0200)
Signed-off-by: Niclas Berglind <nb@kjam.se>
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.030326 seconds and 5 git commands to generate.