Skip to content

Fix moving/duplicating file stored in the root res:// folder - #121795

Open
PeacefulPieDev wants to merge 1 commit into
godotengine:masterfrom
PeacefulPieDev:fix-filesystem-move-duplicate-dialog
Open

Fix moving/duplicating file stored in the root res:// folder#121795
PeacefulPieDev wants to merge 1 commit into
godotengine:masterfrom
PeacefulPieDev:fix-filesystem-move-duplicate-dialog

Conversation

@PeacefulPieDev

Copy link
Copy Markdown

Improved changes from 08e3358 by processing separately the case when moved/duplicated item is being stored in the root folder (res://), which was completely ignored previosly.

What problem(s) does this PR solve?

Additional information

Previosly, the case where file's base directory contains only res:// folder is skipped. The res:// is being trimmed and the root item is never being selected back. That's why the assert is raised later.
I propose to process this case separately and explicitly. It is also may be usefull to add an assert for parts.is_empty() case on next lines, instead of just break , since the situation may never arise.

@KoBeWi , could you please take a look? Am I not missing anything with this dialog processing?

@PeacefulPieDev
PeacefulPieDev requested review from a team as code owners July 26, 2026 14:14
@KoBeWi KoBeWi added this to the 4.x milestone Jul 26, 2026
Comment thread editor/gui/editor_dir_dialog.cpp Outdated
@AThousandShips AThousandShips changed the title Fixed moving/duplicating file stored in the root res:// folder Fix moving/duplicating file stored in the root res:// folder Jul 26, 2026
@AThousandShips AThousandShips changed the title Fix moving/duplicating file stored in the root res:// folder Fix moving/duplicating file stored in the root res:// folder Jul 26, 2026
@AThousandShips AThousandShips modified the milestones: 4.x, 4.8 Jul 27, 2026
Process separately the case when file is stored in the root res:// folder. Mark root item as selected.
@PeacefulPieDev

Copy link
Copy Markdown
Author

Sorry for messing commits up. Something went wrong during squashing all the commits and still they are present. I will fix it tomorrow.

@PeacefulPieDev
PeacefulPieDev requested review from a team as code owners July 28, 2026 06:31
@PeacefulPieDev
PeacefulPieDev marked this pull request as draft July 28, 2026 06:35
@PeacefulPieDev
PeacefulPieDev force-pushed the fix-filesystem-move-duplicate-dialog branch from fd20ef7 to 71d2c49 Compare July 28, 2026 06:42
@PeacefulPieDev
PeacefulPieDev marked this pull request as ready for review July 28, 2026 06:50
@PeacefulPieDev

Copy link
Copy Markdown
Author

Well, now i used AI to guide me through git commands to update the PR. Using force push branch history seems wrong still, at least now it contains only the updated commit.

@AThousandShips
AThousandShips removed request for a team July 28, 2026 07:59
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.

Filesystem, move duplicate dialog, Error Parameter ti is null

3 participants