aboutsummaryrefslogtreecommitdiffstats
path: root/lib/files/view.php
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-02-22 14:56:50 +0100
committerBjörn Schießle <schiessle@owncloud.com>2013-02-22 14:56:50 +0100
commit5b949596867c986916568e5bea2003e04102aa71 (patch)
tree8a6f7b1cf2d7d98763b1fb35499f511530791909 /lib/files/view.php
parent51d050c93515215f5053113c617a4c49c4a4474e (diff)
downloadnextcloud-server-5b949596867c986916568e5bea2003e04102aa71.tar.gz
nextcloud-server-5b949596867c986916568e5bea2003e04102aa71.zip
using the number of writen bytes as indicator if streamCopy() was successfully. Instead check if fwrite returns the number of bytes or false
Diffstat (limited to 'lib/files/view.php')
-rw-r--r--lib/files/view.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/files/view.php b/lib/files/view.php
index 9ac08c98082..11edbadab9b 100644
--- a/lib/files/view.php
+++ b/lib/files/view.php
@@ -361,10 +361,9 @@ class View {
} else {
$source = $this->fopen($path1 . $postFix1, 'r');
$target = $this->fopen($path2 . $postFix2, 'w');
- $count = \OC_Helper::streamCopy($source, $target);
+ $result = \OC_Helper::streamCopy($source, $target);
list($storage1, $internalPath1) = Filesystem::resolvePath($absolutePath1 . $postFix1);
$storage1->unlink($internalPath1);
- $result = $count > 0;
}
if ($this->fakeRoot == Filesystem::getRoot()) {
\OC_Hook::emit(