SftpReadStream: fall back to the storage's own stream instead of failing a read

This commit is contained in:
2026-10-09 11:24:37 +02:00
parent c775e27dd2
commit b3e3054737
4 changed files with 440 additions and 54 deletions
+2 -4
View File
@@ -87,10 +87,8 @@ final class StorageBackend implements IBackend {
if (is_resource($fh)) {
return $fh;
}
if ($fh === null) {
$this->sftpReads = false;
}
// false: not opened, which need not mean missing; the storage's own stream decides
// null: not supported or failing for now; false: not opened, which need not mean
// missing. Either way the storage's own stream decides.
}
$fh = $this->storage->fopen($this->abs($path), 'r');
if ($fh === false) {