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 <[email protected]>
  • Loading branch information
juliusknorr authored and backportbot[bot] committed Jul 25, 2024
1 parent 7f9b44d commit ce67680
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 @@ -1369,9 +1369,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 @@ -1382,6 +1379,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 ce67680

Please sign in to comment.