mirror of
https://github.com/nextcloud/server.git
synced 2026-06-14 03:02:01 -04:00
rewind and update error message
This commit is contained in:
parent
dcfe014103
commit
2fd44dbde4
1 changed files with 2 additions and 1 deletions
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Reference in a new issue