mirror of
https://github.com/nextcloud/server.git
synced 2026-04-23 07:08:34 -04:00
Merge pull request #38930 from nextcloud/chunk-clean-failed
clean failed upload chunks
This commit is contained in:
commit
6cf3e4b82c
1 changed files with 9 additions and 1 deletions
|
|
@ -47,7 +47,15 @@ class UploadFolder implements ICollection {
|
|||
|
||||
public function createFile($name, $data = null) {
|
||||
// TODO: verify name - should be a simple number
|
||||
$this->node->createFile($name, $data);
|
||||
try {
|
||||
$this->node->createFile($name, $data);
|
||||
} catch (\Exception $e) {
|
||||
if ($this->node->childExists($name)) {
|
||||
$child = $this->node->getChild($name);
|
||||
$child->delete();
|
||||
}
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
public function createDirectory($name) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue