Skip to content

Commit

Permalink
fix: Do not fail to get internal path on NonExistingFile/NonExistingF…
Browse files Browse the repository at this point in the history
…older

Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliushaertl authored and AndyScherzinger committed Sep 2, 2024
1 parent bf5d09c commit 2e312e4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/private/Files/Node/NonExistingFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ public function getId() {
}
}

public function getInternalPath() {
if ($this->fileInfo) {
return parent::getInternalPath();
} else {
return $this->getParent()->getMountPoint()->getInternalPath($this->getPath());
}
}

public function stat() {
throw new NotFoundException();
}
Expand Down
8 changes: 8 additions & 0 deletions lib/private/Files/Node/NonExistingFolder.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ public function getId() {
}
}

public function getInternalPath() {
if ($this->fileInfo) {
return parent::getInternalPath();
} else {
return $this->getParent()->getMountPoint()->getInternalPath($this->getPath());
}
}

public function stat() {
throw new NotFoundException();
}
Expand Down

0 comments on commit 2e312e4

Please sign in to comment.