diff options
author | Louis Chemineau <louis@chmn.me> | 2023-06-22 17:49:49 +0200 |
---|---|---|
committer | Louis Chemineau <louis@chmn.me> | 2023-06-22 17:49:49 +0200 |
commit | 7fec07196de645aefacc0cb7df94ecac1d518c67 (patch) | |
tree | a00ed532cd4f0a4ef873b5057e27d8ae2e07735b /apps/files_versions | |
parent | b94145f6bd2c17c74f8319386bc96c3eb486637e (diff) | |
download | nextcloud-server-7fec07196de645aefacc0cb7df94ecac1d518c67.tar.gz nextcloud-server-7fec07196de645aefacc0cb7df94ecac1d518c67.zip |
Do not create a new version if previousNode has the same mtime
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'apps/files_versions')
-rw-r--r-- | apps/files_versions/lib/Listener/FileEventsListener.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_versions/lib/Listener/FileEventsListener.php b/apps/files_versions/lib/Listener/FileEventsListener.php index 1777342feab..fe638364b9d 100644 --- a/apps/files_versions/lib/Listener/FileEventsListener.php +++ b/apps/files_versions/lib/Listener/FileEventsListener.php @@ -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. |