summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-02-22 16:43:11 +0100
committerBjörn Schießle <schiessle@owncloud.com>2013-02-22 16:43:11 +0100
commitd8137fdf66a513d0de4bb234d0427ff27ca40106 (patch)
treed02f9782f8e7e77670f03469847b3044e1172f53 /apps/files_sharing
parent5b949596867c986916568e5bea2003e04102aa71 (diff)
downloadnextcloud-server-d8137fdf66a513d0de4bb234d0427ff27ca40106.tar.gz
nextcloud-server-d8137fdf66a513d0de4bb234d0427ff27ca40106.zip
return both, count and result if the operation succeeded or failed. Maybe in some cases it is useful to know how much bytes where copied
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/lib/sharedstorage.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php
index 65812b7e2fd..e920329ae49 100644
--- a/apps/files_sharing/lib/sharedstorage.php
+++ b/apps/files_sharing/lib/sharedstorage.php
@@ -314,7 +314,8 @@ class Shared extends \OC\Files\Storage\Common {
if ($this->isCreatable(dirname($path2))) {
$source = $this->fopen($path1, 'r');
$target = $this->fopen($path2, 'w');
- return \OC_Helper::streamCopy($source, $target);
+ list ($count, $result) = \OC_Helper::streamCopy($source, $target);
+ return $result;
}
return false;
}