Skip to content

[6.x] Fix Glide+Windows path issue#13945

Open
jackmcdade wants to merge 1 commit into6.xfrom
fix-glide-windows-path-issue
Open

[6.x] Fix Glide+Windows path issue#13945
jackmcdade wants to merge 1 commit into6.xfrom
fix-glide-windows-path-issue

Conversation

@jackmcdade
Copy link
Member

@jackmcdade jackmcdade commented Feb 15, 2026

Closes #6064


Note

Low Risk
Small, targeted change to path normalization plus a regression test; minimal behavioral impact outside Windows-style ID inputs.

Overview
Fixes asset lookup by ID when the asset path contains Windows-style \\ separators.

AssetRepository::findById now normalizes the extracted path by converting backslashes to / before resolving the asset, and a new test asserts find('container::foo\\bar.jpg') correctly returns the saved asset.

Written by Cursor Bugbot for commit fbc5da1. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

public function findById(string $id)
{
[$container_id, $path] = explode('::', $id);
$path = str_replace('\\', '/', $path);
Copy link

Choose a reason for hiding this comment

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

Backslashes in filenames become unreachable

Low Severity

findById now unconditionally converts \ to / in the asset path. This changes the identifier semantics for assets whose real path contains a literal backslash, so an id() generated from that asset can no longer be resolved by findById.

Fix in Cursor Fix in Web

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think this would/could ever happen 🧐

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.

Glide: Directory separator on Windows

1 participant