Skip to content

Commit

Permalink
Also take mtime into account for change detection during editing
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliusknorr committed Apr 21, 2022
1 parent 891f369 commit d17137d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Service/DocumentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ public function autosave($file, $documentId, $version, $autoaveDocument, $force
$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 {
Expand Down

0 comments on commit d17137d

Please sign in to comment.