Skip to content

Duplicate Folder: Fix to remap references between duplicated files. #106763

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

Merged

Conversation

ogapo
Copy link
Contributor

@ogapo ogapo commented May 24, 2025

This change makes it so if you duplicate a folder, the asset references between resources in that folder will point to the new duplicated files.

Previously, if you had dir-a/foo.tscn referencing dir-a/foo.png and you duplicated that folder to dir-b, the duplicate operation would correctly copy both of the files but it would leave dir-b/foo.tscn still referencing dir-a/foo.png!

This change makes it so if you duplicate a folder, the asset references between resources in that folder will point to the new duplicated files.

For instance, if you had dir-a/foo.tscn and dir-a/foo.png where your scene references the png. Previously duplicate would copy both of them to dir-b but dir-b/foo.tscn would still be referencing dir-a/foo.png!
@ogapo ogapo changed the title Fix for directory duplication Duplicate Folder: Fix to remap references between duplicated files. May 24, 2025
@AThousandShips AThousandShips requested a review from KoBeWi May 24, 2025 13:39
@AThousandShips AThousandShips added this to the 4.5 milestone May 24, 2025
@akien-mga akien-mga merged commit 776f8de into godotengine:master Jun 15, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants