summaryrefslogtreecommitdiffstats
path: root/apps/files_versions/lib
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2016-02-19 13:15:09 +0100
committerBjoern Schiessle <schiessle@owncloud.com>2016-02-19 13:15:09 +0100
commit4ef035cc61d1e5f357485d3403357fe745be72d7 (patch)
tree0705bb7f87036ee1646cead63cdc7c30c624c9de /apps/files_versions/lib
parent2dcf887cceca8dd25b3d664fb0726cb6d69739ef (diff)
downloadnextcloud-server-4ef035cc61d1e5f357485d3403357fe745be72d7.tar.gz
nextcloud-server-4ef035cc61d1e5f357485d3403357fe745be72d7.zip
make sure that the file name doesn't end with a trailing slash. Can for example happen single files shared across servers
Diffstat (limited to 'apps/files_versions/lib')
-rw-r--r--apps/files_versions/lib/storage.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/files_versions/lib/storage.php b/apps/files_versions/lib/storage.php
index da736c868fc..4eac476ed66 100644
--- a/apps/files_versions/lib/storage.php
+++ b/apps/files_versions/lib/storage.php
@@ -104,6 +104,9 @@ class Storage {
$ownerView = new View('/'.$uid.'/files');
try {
$filename = $ownerView->getPath($info['fileid']);
+ // make sure that the file name doesn't end with a trailing slash
+ // can for example happen single files shared across servers
+ $filename = rtrim($filename, '/');
} catch (NotFoundException $e) {
$filename = null;
}