diff options
author | Robin Appelman <robin@icewind.nl> | 2022-03-31 15:30:40 +0300 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2022-04-04 16:40:34 +0300 |
commit | d5953e5c33be1a2d8341101c67e4b40cb95b0c7f (patch) | |
tree | 24a116a40d369c19b3a0668dff19112b3be97bb7 | |
parent | 11a6887c7da0740b95c7f0caf2c4d48532f71431 (diff) |
cache internalpath in versions cleanup
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r-- | apps/files_versions/lib/Storage.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files_versions/lib/Storage.php b/apps/files_versions/lib/Storage.php index a6674ab244b..3f91e32ef95 100644 --- a/apps/files_versions/lib/Storage.php +++ b/apps/files_versions/lib/Storage.php @@ -543,9 +543,10 @@ class Storage { }); foreach ($versions as $version) { - \OC_Hook::emit('\OCP\Versions', 'preDelete', ['path' => $version->getInternalPath(), 'trigger' => self::DELETE_TRIGGER_RETENTION_CONSTRAINT]); + $internalPath = $version->getInternalPath(); + \OC_Hook::emit('\OCP\Versions', 'preDelete', ['path' => $internalPath, 'trigger' => self::DELETE_TRIGGER_RETENTION_CONSTRAINT]); $version->delete(); - \OC_Hook::emit('\OCP\Versions', 'delete', ['path' => $version->getInternalPath(), 'trigger' => self::DELETE_TRIGGER_RETENTION_CONSTRAINT]); + \OC_Hook::emit('\OCP\Versions', 'delete', ['path' => $internalPath, 'trigger' => self::DELETE_TRIGGER_RETENTION_CONSTRAINT]); } } |