make sure that the file name doesn't end with a trailing slash. Can for example happen single files shared across servers

This commit is contained in:
Bjoern Schiessle 2016-02-19 13:15:09 +01:00
parent 2dcf887cce
commit 4ef035cc61
1 changed files with 3 additions and 0 deletions

View 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;
}