Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2022-04-21 13:43:31 +0300
committerJulius Härtl <jus@bitgrid.net>2022-04-21 14:27:44 +0300
commitfa139cfa1bbe85d311a7b808f78b9b5de744f667 (patch)
tree43ac2c7ba7bd880849fae2e6bcdfdd3f760b9853 /lib
parent5c9225e8864e7b466c50499045d45cfc9573927d (diff)
Also take mtime into account for change detection during editing
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/Service/DocumentService.php2
1 files changed, 1 insertions, 1 deletions
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 {