diff --git a/apps/files_external/lib/Lib/Storage/SFTP.php b/apps/files_external/lib/Lib/Storage/SFTP.php index 9d8c27dfa8d..80b1472ce66 100644 --- a/apps/files_external/lib/Lib/Storage/SFTP.php +++ b/apps/files_external/lib/Lib/Storage/SFTP.php @@ -506,7 +506,7 @@ class SFTP extends Common { $stream = CountWrapper::wrap($stream, function (int $writtenSize) use (&$size) { $size = $writtenSize; }); - if (!$stream) { + if (!is_resource($stream)) { throw new \Exception("Failed to wrap stream"); } }