diff options
Diffstat (limited to 'lib/helper.php')
-rw-r--r-- | lib/helper.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/helper.php b/lib/helper.php index add5c66e7be..41985ca57a7 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -513,11 +513,16 @@ class OC_Helper { if(!$source or !$target) { return false; } - $count=0; + $result = true; + $count = 0; while(!feof($source)) { - $count+=fwrite($target, fread($source, 8192)); + if ( ( $c = fwrite($target, fread($source, 8192)) ) === false) { + $result = false; + } else { + $count += $c; + } } - return $count; + return array($count, $result); } /** |