]> source.dussan.org Git - nextcloud-server.git/commitdiff
make sure that the file name doesn't end with a trailing slash. Can for example happe...
authorBjoern Schiessle <schiessle@owncloud.com>
Fri, 19 Feb 2016 12:15:09 +0000 (13:15 +0100)
committerBjoern Schiessle <schiessle@owncloud.com>
Fri, 19 Feb 2016 12:15:09 +0000 (13:15 +0100)
apps/files_versions/lib/storage.php

index da736c868fc1c00b1682f49b66f747ae8bada785..4eac476ed66dcca6dd6b6b1d1ac7c66579130ae2 100644 (file)
@@ -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;
                        }