diff options
author | Robin Appelman <robin@icewind.nl> | 2022-03-31 14:30:40 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2022-04-04 15:40:34 +0200 |
commit | d5953e5c33be1a2d8341101c67e4b40cb95b0c7f (patch) | |
tree | 24a116a40d369c19b3a0668dff19112b3be97bb7 /apps/files_versions | |
parent | 11a6887c7da0740b95c7f0caf2c4d48532f71431 (diff) | |
download | nextcloud-server-d5953e5c33be1a2d8341101c67e4b40cb95b0c7f.tar.gz nextcloud-server-d5953e5c33be1a2d8341101c67e4b40cb95b0c7f.zip |
cache internalpath in versions cleanup
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_versions')
-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]); } } |