Merge pull request #9620 from owncloud/search-fileinfo-path

Use the correct path when building the FileInfo for the search result
This commit is contained in:
icewind1991 2014-07-14 21:32:17 +02:00
commit 592dad0a71
1 changed files with 2 additions and 1 deletions

View File

@ -1103,8 +1103,9 @@ class View {
foreach ($results as $result) { foreach ($results as $result) {
if (substr($mountPoint . $result['path'], 0, $rootLength + 1) === $this->fakeRoot . '/') { if (substr($mountPoint . $result['path'], 0, $rootLength + 1) === $this->fakeRoot . '/') {
$internalPath = $result['path']; $internalPath = $result['path'];
$path = $mountPoint . $result['path'];
$result['path'] = substr($mountPoint . $result['path'], $rootLength); $result['path'] = substr($mountPoint . $result['path'], $rootLength);
$files[] = new FileInfo($mountPoint . $result['path'], $storage, $internalPath, $result); $files[] = new FileInfo($path, $storage, $internalPath, $result);
} }
} }