From 6b9eb8eafdc12d1e6a401394d759e1a22c6ff221 Mon Sep 17 00:00:00 2001 From: Jason Varga Date: Wed, 18 Sep 2024 10:38:26 -0400 Subject: [PATCH] [5.x] Set path on asset folder when moving (#10813) --- src/Assets/AssetFolder.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Assets/AssetFolder.php b/src/Assets/AssetFolder.php index c4a300799b..2e96f11a92 100644 --- a/src/Assets/AssetFolder.php +++ b/src/Assets/AssetFolder.php @@ -133,7 +133,7 @@ public function delete() }); $cache->save(); - AssetFolderDeleted::dispatch($this); + AssetFolderDeleted::dispatch(clone $this); return $this; } @@ -183,6 +183,8 @@ public function move($parent, $name = null) $this->container()->assets($oldPath)->each->move($newPath); $this->delete(); + $this->path($newPath); + return $folder; }