We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f2f1074 commit 0b1f71aCopy full SHA for 0b1f71a
apps/files_versions/lib/Listener/FileEventsListener.php
@@ -219,11 +219,12 @@ public function post_write_hook(Node $node): void {
219
}
220
221
if (
222
- ($writeHookInfo['versionCreated'] || $writeHookInfo['previousNode']->getSize() === 0) &&
+ $writeHookInfo['versionCreated'] &&
223
$node->getMTime() !== $writeHookInfo['previousNode']->getMTime()
224
) {
225
// If a new version was created, insert a version in the DB for the current content.
226
- // Unless both versions have the same mtime.
+ // If both versions have the same mtime, it means the latest version file simply got overrode,
227
+ // so no need to create a new version.
228
$this->created($node);
229
} else {
230
try {
0 commit comments