mirror of
https://github.com/nextcloud/server.git
synced 2026-04-20 22:00:39 -04:00
Test valid path only if file info has to be retrieved
Signed-off-by: Glandos <bugs-github@antipoul.fr>
This commit is contained in:
parent
7f2c21f056
commit
48ca33761f
1 changed files with 3 additions and 3 deletions
|
|
@ -99,10 +99,10 @@ class Node implements \OCP\Files\Node {
|
|||
* @throws NotFoundException
|
||||
*/
|
||||
public function getFileInfo() {
|
||||
if (!Filesystem::isValidPath($this->path)) {
|
||||
throw new InvalidPathException();
|
||||
}
|
||||
if (!$this->fileInfo) {
|
||||
if (!Filesystem::isValidPath($this->path)) {
|
||||
throw new InvalidPathException();
|
||||
}
|
||||
$fileInfo = $this->view->getFileInfo($this->path);
|
||||
if ($fileInfo instanceof FileInfo) {
|
||||
$this->fileInfo = $fileInfo;
|
||||
|
|
|
|||
Loading…
Reference in a new issue