Query the cache when checking if a node exists

This commit is contained in:
Robin Appelman 2016-02-18 15:36:38 +01:00
parent 5ca10cf6f8
commit 70a5233f69
1 changed files with 3 additions and 2 deletions

View File

@ -176,8 +176,9 @@ class Root extends Folder implements IRootFolder {
$path = $this->normalizePath($path);
if ($this->isValidPath($path)) {
$fullPath = $this->getFullPath($path);
if ($this->view->file_exists($fullPath)) {
return $this->createNode($fullPath);
$fileInfo = $this->view->getFileInfo($fullPath);
if ($fileInfo) {
return $this->createNode($fullPath, $fileInfo);
} else {
throw new NotFoundException($path);
}