diff options
author | Frank Karlitschek <frank@owncloud.org> | 2013-02-25 02:04:12 -0800 |
---|---|---|
committer | Frank Karlitschek <frank@owncloud.org> | 2013-02-25 02:04:12 -0800 |
commit | 9ee5069f2a1d76c899eeef6cec0f06387764fabd (patch) | |
tree | e1d381e72428a2d8f03b19ed46962c7914e1eaef /lib/files/storage | |
parent | 8f659169047f2dcdd6f7a15b2b31b537fe858953 (diff) | |
parent | eabfd9b69b11fd0859dee919d702b39bd50369dd (diff) | |
download | nextcloud-server-9ee5069f2a1d76c899eeef6cec0f06387764fabd.tar.gz nextcloud-server-9ee5069f2a1d76c899eeef6cec0f06387764fabd.zip |
Merge pull request #1856 from owncloud/fix_error_handling_stream_copy
don't use the number of written bytes as indicator if streamCopy() was successful
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 8faacdf01d8..f9c6bdfce0c 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; } /** |