From c93374009d83ed97d0c5d3d787926e66cefd918d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Thu, 21 Apr 2022 12:43:31 +0200 Subject: Also take mtime into account for change detection during editing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/Service/DocumentService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/Service/DocumentService.php b/lib/Service/DocumentService.php index ee82baf82..f88988d52 100644 --- a/lib/Service/DocumentService.php +++ b/lib/Service/DocumentService.php @@ -287,7 +287,7 @@ class DocumentService { $savedEtag = $file->getEtag(); $lastMTime = $document->getLastSavedVersionTime(); - if ($lastMTime > 0 && $savedEtag !== $document->getLastSavedVersionEtag() && $force === false) { + if ($lastMTime > 0 && $savedEtag !== $document->getLastSavedVersionEtag() && $lastMTime !== $file->getMtime() && $force === false) { if (!$this->cache->get('document-save-lock-' . $documentId)) { throw new DocumentSaveConflictException('File changed in the meantime from outside'); } else { -- cgit v1.2.3