mirror of
https://github.com/nextcloud/server.git
synced 2026-04-27 09:08:22 -04:00
clean failed upload chunks
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
32bbe3db81
commit
58a4a222d0
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