diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2025-05-16 00:07:33 +0200 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2025-05-16 13:03:05 +0200 |
commit | 01db539d0ae936abdc82723d458cf816dcb6aad8 (patch) | |
tree | d1bc7707264e91bd0c5f39c83262b00ce0b3c689 /lib/private/Files/View.php | |
parent | 12fdcd0826d59a797d5e9e6aaea181dde240f503 (diff) | |
download | nextcloud-server-01db539d0ae936abdc82723d458cf816dcb6aad8.tar.gz nextcloud-server-01db539d0ae936abdc82723d458cf816dcb6aad8.zip |
chore: move streamCopy implementation from `OC_Helper` to `OCP\Files`
The function was already there but called the legacy version.
So moved the implementation and migrated all usages of it.
Sadly the interface was slightly different so adjusted it to be
compatible with both legacy and the OCP one.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'lib/private/Files/View.php')
-rw-r--r-- | lib/private/Files/View.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index e49043355e8..6832b4e1551 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -17,6 +17,7 @@ use OC\User\Manager as UserManager; use OC\User\User; use OCA\Files_Sharing\SharedMount; use OCP\Constants; +use OCP\Files; use OCP\Files\Cache\ICacheEntry; use OCP\Files\ConnectionLostException; use OCP\Files\EmptyFileNameException; @@ -629,7 +630,7 @@ class View { [$storage, $internalPath] = $this->resolvePath($path); $target = $storage->fopen($internalPath, 'w'); if ($target) { - [, $result] = \OC_Helper::streamCopy($data, $target); + [, $result] = Files::streamCopy($data, $target, true); fclose($target); fclose($data); |