Skip to content

Commit 7c367b6

Browse files
committed
cache internalpath in versions cleanup
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 parent 3713063 commit 7c367b6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

apps/files_versions/lib/Storage.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,9 +543,10 @@ public static function expireOlderThanMaxForUser($uid) {
543543
});
544544

545545
foreach ($versions as $version) {
546-
\OC_Hook::emit('\OCP\Versions', 'preDelete', ['path' => $version->getInternalPath(), 'trigger' => self::DELETE_TRIGGER_RETENTION_CONSTRAINT]);
546+
$internalPath = $version->getInternalPath();
547+
\OC_Hook::emit('\OCP\Versions', 'preDelete', ['path' => $internalPath, 'trigger' => self::DELETE_TRIGGER_RETENTION_CONSTRAINT]);
547548
$version->delete();
548-
\OC_Hook::emit('\OCP\Versions', 'delete', ['path' => $version->getInternalPath(), 'trigger' => self::DELETE_TRIGGER_RETENTION_CONSTRAINT]);
549+
\OC_Hook::emit('\OCP\Versions', 'delete', ['path' => $internalPath, 'trigger' => self::DELETE_TRIGGER_RETENTION_CONSTRAINT]);
549550
}
550551
}
551552

0 commit comments

Comments
 (0)