diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-01-08 09:46:40 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-01-08 09:46:40 +0100 |
commit | 5f171618fd40535593ccd0a0a83d7f740e458f60 (patch) | |
tree | a1ed0ab21bda5405c5015a3f63ca4b5ce78f0d1b /lib/private | |
parent | 2e57fe93e4abf7608265c25fec414528ae882187 (diff) | |
download | nextcloud-server-5f171618fd40535593ccd0a0a83d7f740e458f60.tar.gz nextcloud-server-5f171618fd40535593ccd0a0a83d7f740e458f60.zip |
remove unused variable and fix undefined variable
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/connector/sabre/file.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/private/connector/sabre/file.php b/lib/private/connector/sabre/file.php index cd05db8e12a..0f5a3315f8f 100644 --- a/lib/private/connector/sabre/file.php +++ b/lib/private/connector/sabre/file.php @@ -74,7 +74,7 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements \Sabre\ return $this->createFileChunked($data); } - list($storage, $internalPath) = $this->fileView->resolvePath($this->path); + list($storage, ) = $this->fileView->resolvePath($this->path); $needsPartFile = $this->needsPartFile($storage); if ($needsPartFile) { @@ -277,17 +277,17 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements \Sabre\ } if ($chunk_handler->isComplete()) { - list($storage, $internalPath) = $this->fileView->resolvePath($path); + list($storage, ) = $this->fileView->resolvePath($path); $needsPartFile = $this->needsPartFile($storage); try { + $targetPath = $path . '/' . $info['name']; if ($needsPartFile) { // we first assembly the target file as a part file $partFile = $path . '/' . $info['name'] . '.ocTransferId' . $info['transferid'] . '.part'; $chunk_handler->file_assemble($partFile); // here is the final atomic rename - $targetPath = $path . '/' . $info['name']; $renameOkay = $this->fileView->rename($partFile, $targetPath); $fileExists = $this->fileView->file_exists($targetPath); if ($renameOkay === false || $fileExists === false) { @@ -300,8 +300,7 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements \Sabre\ } } else { // assemble directly into the final file - $partFile = $path . '/' . $info['name']; - $chunk_handler->file_assemble($partFile); + $chunk_handler->file_assemble($targetPath); } // allow sync clients to send the mtime along in a header |