Skip to content

[DRAFT] Improve FileLoader file uri to path handling for windows#8163

Open
aconbere wants to merge 1 commit into
emilk:mainfrom
aconbere:fix-windows-file-uri-unc-handling
Open

[DRAFT] Improve FileLoader file uri to path handling for windows#8163
aconbere wants to merge 1 commit into
emilk:mainfrom
aconbere:fix-windows-file-uri-unc-handling

Conversation

@aconbere
Copy link
Copy Markdown

Current behavior fails when translating file uris that contain windows UNC paths. This commit attempts to fix that behavior by looking at the hostname attribute of the uri and changing behavior if the hostname is present.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 15, 2026

Preview available at https://egui-pr-preview.github.io/pr/8163-fix-windows-file-uri-unc-handling
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

View snapshot changes at kitdiff

@aconbere aconbere changed the title Improve FileLoader file uri to path handling for windows [DRAFT] Improve FileLoader file uri to path handling for windows May 15, 2026
// We need to load the file at `path`.

// Set the file to `pending` until we finish loading it.
let path = path.to_owned();
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

the pathbuf returned from convert_uri_to_path is already owned.

@aconbere
Copy link
Copy Markdown
Author

I can confirm that with my local app this change fixes the behavior allowing both local paths and remote paths to work on windows. One of the test demo app tests are failing, and I'm not sure how to work with those yet.

Current behavior fails when translating file uris that contain windows
UNC paths. This commit attempts to fix that behavior by looking at the
hostname attribute of the uri and changing behavior if the hostname is
present.
@emilk emilk added bug Something is broken native-windows Running on native Windows OS egui_extras labels May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something is broken egui_extras native-windows Running on native Windows OS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Image::from_uri fails to load images when attempting to load images from a windows network share.

2 participants