Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Test valid path only if file info has to be retrieved
Signed-off-by: Glandos <[email protected]>
  • Loading branch information
Glandos committed Nov 6, 2022
commit 48ca33761fd221459ceea6bb8f579d3286bd0ef4
6 changes: 3 additions & 3 deletions lib/private/Files/Node/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ protected function createNonExistingNode($path) {
* @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;
Expand Down