X Tutup
Skip to content

[Unix] Remove leading .. from absolute paths and apply simplify_path to Unix current directory path.#113575

Merged
akien-mga merged 1 commit intogodotengine:masterfrom
bruvzg:fix_path
Dec 18, 2025
Merged

[Unix] Remove leading .. from absolute paths and apply simplify_path to Unix current directory path.#113575
akien-mga merged 1 commit intogodotengine:masterfrom
bruvzg:fix_path

Conversation

@bruvzg
Copy link
Member

@bruvzg bruvzg commented Dec 4, 2025

  • Removes all leading .. from absolute paths in simplify_path.
  • Apply simplify_path in the Unix fix_path (same is already done on Windows).

Fixes #113497

@bruvzg bruvzg added this to the 4.6 milestone Dec 4, 2025
@bruvzg bruvzg requested review from a team as code owners December 4, 2025 17:10
@AThousandShips AThousandShips added the cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release label Dec 4, 2025
@bruvzg bruvzg marked this pull request as draft December 4, 2025 17:24
@bruvzg
Copy link
Member Author

bruvzg commented Dec 4, 2025

Failed test seems to be an abuse of path, it's trying to load res://../texture.png, which should not work.

@bruvzg
Copy link
Member Author

bruvzg commented Dec 4, 2025

Since it might be used by GLTF importer, I have added a check to allow res://../ paths, but this should be reconsidered in the future, files outside the project should not be accessible this way.

@bruvzg bruvzg marked this pull request as ready for review December 4, 2025 18:17
@akien-mga akien-mga removed the cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release label Dec 18, 2025
@akien-mga akien-mga modified the milestones: 4.6, 4.7 Dec 18, 2025
Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bug has already been fixed by an alternative approach, so this is not urgent.

But let's give it a spin for 4.7-dev so that we have enough time to solve any potential side effects of changing simplify_path.

@akien-mga akien-mga merged commit 30c2fc1 into godotengine:master Dec 18, 2025
20 checks passed
@akien-mga
Copy link
Member

Well it seems I merged this anyway by mistake in my last batch...

It's going to be in 4.6-beta2, so let's see if any issue is reported or not.

@akien-mga akien-mga modified the milestones: 4.7, 4.6 Dec 18, 2025
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.

File dialog shows repeated "/.." segments when navigating parent from root

4 participants

X Tutup