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) {
}
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) {
}
} 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