Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x] Set path on asset folder when moving #10813

Merged
merged 1 commit into from
Sep 18, 2024
Merged

Conversation

jasonvarga
Copy link
Member

@jasonvarga jasonvarga commented Sep 18, 2024

When moving an asset folder, the new path should be set. If you do $folder->path() currently the old path is shown.
Now the new one would be shown.

This already happens when you move an asset.

$this->path($newPath);

When dispatching the deleted event, we clone the object so $folder->path() within the listener does output the old path. That was the one that was deleted. If we didn't clone, since the object is passed by reference, the path would be the new one.

@jasonvarga jasonvarga merged commit 6b9eb8e into 5.x Sep 18, 2024
18 checks passed
@jasonvarga jasonvarga deleted the new-path-move-asset-folder branch September 18, 2024 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant