Merge pull request #10191 from owncloud/sharing_rm_trailing_slash

[sharing] remove trailing slash
remotes/origin/fix-10825
Morris Jobke 11 years ago
commit 9fb79c86f0
  1. 1
      apps/files_sharing/lib/api.php
  2. 3
      lib/private/share/share.php

@ -64,7 +64,6 @@ class Api {
$share['isPreviewAvailable'] = true;
}
}
$newShares[] = $share;
}
return new \OC_OCS_Result($shares);
}

@ -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, '/');
}
}
}

Loading…
Cancel
Save