From 48c57b80e3039fe9ccd8eb679e1043e842e0398f Mon Sep 17 00:00:00 2001
From: Bjoern Schiessle <schiessle@owncloud.com>
Date: Tue, 5 Aug 2014 20:34:32 +0200
Subject: [PATCH] remove trailing slash from path

---
 lib/private/share/share.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index 450c71cf8a..cf33f9b65f 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -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, '/');
 					}
 				}
 			}
-- 
GitLab