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
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2022-04-21 19:09:00 +0300
commitc93374009d83ed97d0c5d3d787926e66cefd918d (patch)
tree8a3c1a67b489cb3ef6fb604c9b98e2395200e786 /lib
parentfccfa2b42b4ea7086ae7b1108f74ab8f6597c87e (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 {