From 4ef035cc61d1e5f357485d3403357fe745be72d7 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Fri, 19 Feb 2016 13:15:09 +0100 Subject: [PATCH] make sure that the file name doesn't end with a trailing slash. Can for example happen single files shared across servers --- apps/files_versions/lib/storage.php | 3 +++ 1 file changed, 3 insertions(+) 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; } -- 2.39.5