diff options
author | Björn Schießle <schiessle@owncloud.com> | 2013-02-22 16:43:11 +0100 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2013-02-22 16:43:11 +0100 |
commit | d8137fdf66a513d0de4bb234d0427ff27ca40106 (patch) | |
tree | d02f9782f8e7e77670f03469847b3044e1172f53 /lib/files/storage | |
parent | 5b949596867c986916568e5bea2003e04102aa71 (diff) | |
download | nextcloud-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 'lib/files/storage')
-rw-r--r-- | lib/files/storage/common.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/files/storage/common.php b/lib/files/storage/common.php index 4e7a73e5d4a..fd9ae844a8e 100644 --- a/lib/files/storage/common.php +++ b/lib/files/storage/common.php @@ -97,8 +97,8 @@ abstract class Common implements \OC\Files\Storage\Storage { public function copy($path1, $path2) { $source=$this->fopen($path1, 'r'); $target=$this->fopen($path2, 'w'); - $count=\OC_Helper::streamCopy($source, $target); - return $count>0; + list($count, $result) = \OC_Helper::streamCopy($source, $target); + return $result; } /** |