diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-04-13 14:14:48 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2015-04-13 14:14:48 +0200 |
commit | 2fd44dbde44c3540d664ade0df277553e7759186 (patch) | |
tree | efafa507601e4cec6fff58abe572af6ed6316e5a /lib | |
parent | dcfe014103368eba463234f5369c1edbfe7a1968 (diff) | |
download | nextcloud-server-2fd44dbde44c3540d664ade0df277553e7759186.tar.gz nextcloud-server-2fd44dbde44c3540d664ade0df277553e7759186.zip |
rewind and update error message
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/connector/sabre/file.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/connector/sabre/file.php b/lib/private/connector/sabre/file.php index 1e19880857c..bc4535657dc 100644 --- a/lib/private/connector/sabre/file.php +++ b/lib/private/connector/sabre/file.php @@ -85,6 +85,7 @@ class File extends Node implements IFile { if (is_string($data)) { $stream = fopen('php://temp', 'r+'); fwrite($stream, $data); + fseek($stream, 0); $data = $stream; }; try { @@ -121,7 +122,7 @@ class File extends Node implements IFile { try { $target = $storage->fopen($internalPartPath, 'wb'); if ($target === false) { - \OC_Log::write('webdav', '\OC\Files\Filesystem::file_put_contents() failed', \OC_Log::ERROR); + \OC_Log::write('webdav', '\OC\Files\Filesystem::fopen() failed', \OC_Log::ERROR); $this->fileView->unlink($partFilePath); // because we have no clue about the cause we can only throw back a 500/Internal Server Error throw new Exception('Could not write file contents'); |