summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Node/Node.php
diff options
context:
space:
mode:
authorGlandos <bugs-github@antipoul.fr>2022-11-06 19:23:23 +0100
committerGlandos <bugs-github@antipoul.fr>2022-11-06 19:23:53 +0100
commit48ca33761fd221459ceea6bb8f579d3286bd0ef4 (patch)
tree0b3780e3dcc06183a42071f0e7078d7e57e9a0dd /lib/private/Files/Node/Node.php
parent7f2c21f05658128e5dbefd4d64a6cdbdf9334631 (diff)
downloadnextcloud-server-48ca33761fd221459ceea6bb8f579d3286bd0ef4.tar.gz
nextcloud-server-48ca33761fd221459ceea6bb8f579d3286bd0ef4.zip
Test valid path only if file info has to be retrieved
Signed-off-by: Glandos <bugs-github@antipoul.fr>
Diffstat (limited to 'lib/private/Files/Node/Node.php')
-rw-r--r--lib/private/Files/Node/Node.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Files/Node/Node.php b/lib/private/Files/Node/Node.php
index bfa4d6861ea..8a752ff281d 100644
--- a/lib/private/Files/Node/Node.php
+++ b/lib/private/Files/Node/Node.php
@@ -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;