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.
2 parents 94e8727 + 68fcbbd commit ea406f1Copy full SHA for ea406f1
apps/files_versions/lib/Listener/FileEventsListener.php
@@ -218,11 +218,12 @@ public function post_write_hook(Node $node): void {
218
}
219
220
if (
221
- ($writeHookInfo['versionCreated'] || $writeHookInfo['previousNode']->getSize() === 0) &&
+ $writeHookInfo['versionCreated'] &&
222
$node->getMTime() !== $writeHookInfo['previousNode']->getMTime()
223
) {
224
// If a new version was created, insert a version in the DB for the current content.
225
- // Unless both versions have the same mtime.
+ // If both versions have the same mtime, it means the latest version file simply got overrode,
226
+ // so no need to create a new version.
227
$this->created($node);
228
} else {
229
try {
0 commit comments