mirror of
https://github.com/nextcloud/server.git
synced 2026-04-27 17:18:48 -04:00
Do not create a new version if previousNode has the same mtime
Signed-off-by: Louis Chemineau <louis@chmn.me>
This commit is contained in:
parent
b94145f6bd
commit
7fec07196d
1 changed files with 2 additions and 2 deletions
|
|
@ -232,8 +232,8 @@ class FileEventsListener implements IEventListener {
|
|||
}
|
||||
|
||||
if (
|
||||
($writeHookInfo['versionCreated'] && $node->getMTime() !== $writeHookInfo['previousNode']->getMTime()) ||
|
||||
$writeHookInfo['previousNode']->getSize() === 0
|
||||
($writeHookInfo['versionCreated'] || $writeHookInfo['previousNode']->getSize() === 0) &&
|
||||
$node->getMTime() !== $writeHookInfo['previousNode']->getMTime()
|
||||
) {
|
||||
// If a new version was created, insert a version in the DB for the current content.
|
||||
// Unless both versions have the same mtime.
|
||||
|
|
|
|||
Loading…
Reference in a new issue