aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2023-09-01 17:34:58 +0200
committerRobin Appelman <robin@icewind.nl>2023-09-04 16:30:12 +0200
commitc264903cb9142cddcc584776bea73b788339193d (patch)
tree6b6d712bea7176be171c9097d1b71cdcb8c7eb33 /apps/files_external/lib
parente3a39f5117a7054dab4b9ef264247686c55738b9 (diff)
downloadnextcloud-server-c264903cb9142cddcc584776bea73b788339193d.tar.gz
nextcloud-server-c264903cb9142cddcc584776bea73b788339193d.zip
psalm suppress
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_external/lib')
-rw-r--r--apps/files_external/lib/Lib/Storage/SFTP.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/files_external/lib/Lib/Storage/SFTP.php b/apps/files_external/lib/Lib/Storage/SFTP.php
index bc25477bcf6..e792cef75a9 100644
--- a/apps/files_external/lib/Lib/Storage/SFTP.php
+++ b/apps/files_external/lib/Lib/Storage/SFTP.php
@@ -488,6 +488,7 @@ class SFTP extends Common {
}
public function file_put_contents($path, $data) {
+ /** @psalm-suppress InternalMethod */
$result = $this->getConnection()->put($this->absPath($path), $data);
if ($result) {
return strlen($data);
@@ -502,6 +503,7 @@ class SFTP extends Common {
$size = $writtenSize;
});
}
+ /** @psalm-suppress InternalMethod */
$result = $this->getConnection()->put($this->absPath($path), $stream);
fclose($stream);
if ($result) {
@@ -524,10 +526,12 @@ class SFTP extends Common {
return false;
}
for ($i = 0; $i < $size; $i += self::COPY_CHUNK_SIZE) {
+ /** @psalm-suppress InvalidArgument */
$chunk = $connection->get($absSource, false, $i, self::COPY_CHUNK_SIZE);
if ($chunk === false) {
return false;
}
+ /** @psalm-suppress InternalMethod */
if (!$connection->put($absTarget, $chunk, \phpseclib\Net\SFTP::SOURCE_STRING, $i)) {
return false;
}