]> source.dussan.org Git - nextcloud-server.git/commitdiff
remove trailing slash from path
authorBjoern Schiessle <schiessle@owncloud.com>
Tue, 5 Aug 2014 18:34:32 +0000 (20:34 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Wed, 6 Aug 2014 13:19:10 +0000 (15:19 +0200)
lib/private/share/share.php

index 7a1e1298a935d8433ab2fb937c82b1c333371995..daed42440d7b0c5c0c358644450e65f20965d48f 100644 (file)
@@ -1388,7 +1388,8 @@ class Share extends \OC\Share\Constants {
                                        }
                                        if ($mounts[$row['storage']]) {
                                                $path = $mounts[$row['storage']]->getMountPoint().$row['path'];
-                                               $row['path'] = substr($path, $root);
+                                               $relPath = substr($path, $root); // path relative to data/user
+                                               $row['path'] = rtrim($relPath, '/');
                                        }
                                }
                        }