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 86581f6626
commit a98b038300
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); $path = $this->normalizePath($path);
if ($this->isValidPath($path)) { if ($this->isValidPath($path)) {
$fullPath = $this->getFullPath($path); $fullPath = $this->getFullPath($path);
if ($this->view->file_exists($fullPath)) { $fileInfo = $this->view->getFileInfo($fullPath);
return $this->createNode($fullPath); if ($fileInfo) {
return $this->createNode($fullPath, $fileInfo);
} else { } else {
throw new NotFoundException($path); throw new NotFoundException($path);
} }