Skip to content

Commit f05d389

Browse files
fixup! fix(dav): finalize upload metadata before downgrading lock
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
1 parent 764f926 commit f05d389

1 file changed

Lines changed: 0 additions & 16 deletions

File tree

apps/dav/lib/Connector/Sabre/File.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -347,14 +347,9 @@ public function put($data) {
347347

348348
private function finalizeUpload(IStorage $storage, string $internalPath, bool $exists, ?View $view): void {
349349
// Since we skipped the view for the final publish step, finalize the file
350-
<<<<<<< HEAD
351350
// state explicitly here: update cache/bookkeeping, persist metadata, then
352351
// downgrade to a shared lock before emitting post-write hooks so listeners
353352
// can still access the file.
354-
=======
355-
// state explicitly here: update cache/bookkeeping, persist metadata, emit
356-
// post-write hooks, and only then downgrade the lock.
357-
>>>>>>> 09a413c0b2b (fix(dav): finalize upload metadata before downgrading lock)
358353
$storage->getUpdater()->update($internalPath);
359354

360355
$fileInfoUpdate = [
@@ -389,28 +384,17 @@ private function finalizeUpload(IStorage $storage, string $internalPath, bool $e
389384
$this->fileView->putFileInfo($this->path, $fileInfoUpdate);
390385
$this->refreshInfo();
391386

392-
<<<<<<< HEAD
393387
// Downgrade to shared lock before post hooks so legacy hook consumers can
394388
// still access the file during post_write.
395-
=======
396-
if ($view) {
397-
$this->emitPostHooks($exists);
398-
}
399-
400-
// Keep the exclusive lock until all bookkeeping and metadata updates are complete.
401-
>>>>>>> 09a413c0b2b (fix(dav): finalize upload metadata before downgrading lock)
402389
try {
403390
$this->changeLock(ILockingProvider::LOCK_SHARED);
404391
} catch (LockedException $e) {
405392
throw new FileLocked($e->getMessage(), $e->getCode(), $e);
406393
}
407-
<<<<<<< HEAD
408394

409395
if ($view) {
410396
$this->emitPostHooks($exists);
411397
}
412-
=======
413-
>>>>>>> 09a413c0b2b (fix(dav): finalize upload metadata before downgrading lock)
414398
}
415399

416400
private function getPartFileBasePath($path) {

0 commit comments

Comments
 (0)