diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index 450c71cf8a2c2cd940a30bec6d595611d9d2801c..cf33f9b65f5bba7dc359772940fc00ca5f0cb330 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, '/');
 					}
 				}
 			}