Skip to content

Commit 6be1d99

Browse files
committed
fix: Do not fail to get internal path on NonExistingFile/NonExistingFolder
Signed-off-by: Julius Härtl <jus@bitgrid.net>
1 parent d6d476e commit 6be1d99

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

lib/private/Files/Node/NonExistingFile.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ public function getId() {
3838
}
3939
}
4040

41+
public function getInternalPath() {
42+
if ($this->fileInfo) {
43+
return parent::getInternalPath();
44+
} else {
45+
return $this->getParent()->getMountPoint()->getInternalPath($this->getPath());
46+
}
47+
}
48+
4149
public function stat() {
4250
throw new NotFoundException();
4351
}

lib/private/Files/Node/NonExistingFolder.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ public function getId() {
3838
}
3939
}
4040

41+
public function getInternalPath() {
42+
if ($this->fileInfo) {
43+
return parent::getInternalPath();
44+
} else {
45+
return $this->getParent()->getMountPoint()->getInternalPath($this->getPath());
46+
}
47+
}
48+
4149
public function stat() {
4250
throw new NotFoundException();
4351
}

0 commit comments

Comments
 (0)