Skip to content

Commit 99287da

Browse files
committed
BulkUploadPlugin: Fix POST for regular file at previous symlink location
Signed-off-by: Tamino Bauknecht <dev@tb6.eu>
1 parent 90c27da commit 99287da

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

apps/dav/lib/BulkUpload/BulkUploadPlugin.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ public function httpPost(RequestInterface $request, ResponseInterface $response)
111111

112112
if (isset($headers['oc-file-type']) && $headers['oc-file-type'] == 1) {
113113
$this->symlinkManager->storeSymlink($node);
114+
} elseif ($this->symlinkManager->isSymlink($node)) {
115+
// uploaded file is not a symlink, but there was a symlink
116+
// at the same location before
117+
$this->symlinkManager->deleteSymlink($node);
114118
}
115119

116120
$writtenFiles[$headers['x-file-path']] = [

0 commit comments

Comments
 (0)