From 456ca0cf7d8fd259e58ea302b6849db5a001ce15 Mon Sep 17 00:00:00 2001
From: Robin Appelman <icewind@owncloud.com>
Date: Fri, 25 Apr 2014 12:31:44 +0200
Subject: [PATCH] fix paths of searchByMime results on substorages

---
 lib/private/files/view.php | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/private/files/view.php b/lib/private/files/view.php
index 58dfc73dcf..93d2c15c50 100644
--- a/lib/private/files/view.php
+++ b/lib/private/files/view.php
@@ -1109,8 +1109,9 @@ class View {
 					if ($results) {
 						foreach ($results as $result) {
 							$internalPath = $result['path'];
-							$result['path'] = $relativeMountPoint . $result['path'];
-							$files[] = new FileInfo($mountPoint . $result['path'], $storage, $internalPath, $result);
+							$result['path'] = rtrim($relativeMountPoint . $result['path'], '/');
+							$path = rtrim($mountPoint . $internalPath, '/');
+							$files[] = new FileInfo($path, $storage, $internalPath, $result);
 						}
 					}
 				}
-- 
GitLab