Skip to content

Commit

Permalink
fix: Do not return partial file info if we have a cache entry
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliusknorr committed Jul 22, 2024
1 parent 6c1e896 commit 2b0bc8b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/private/Files/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -1338,9 +1338,6 @@ public function getFileInfo($path, $includeMountPoints = true) {
if (!Filesystem::isValidPath($path)) {
return false;
}
if (Cache\Scanner::isPartialFile($path)) {
return $this->getPartFileInfo($path);
}
$relativePath = $path;
$path = Filesystem::normalizePath($this->fakeRoot . '/' . $path);

Expand All @@ -1351,6 +1348,10 @@ public function getFileInfo($path, $includeMountPoints = true) {
$data = $this->getCacheEntry($storage, $internalPath, $relativePath);

if (!$data instanceof ICacheEntry) {
if (Cache\Scanner::isPartialFile($relativePath)) {
return $this->getPartFileInfo($relativePath);
}

return false;
}

Expand Down

0 comments on commit 2b0bc8b

Please sign in to comment.