Skip to content
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

Allow use of UNC paths on Windows #755

Merged
merged 1 commit into from
Feb 28, 2024
Merged

Conversation

kyllingstad
Copy link
Member

@kyllingstad kyllingstad commented Feb 26, 2024

This fixes issue #619.

File URIs generally have the form file://hostname/path/to/file. When hostname is not localhost (nor empty) the file URI scheme leaves the file access mechanism unspecified. However, on Windows, such URIs are commonly interpreted as UNC paths, so in this case it would be \\hostname\path\to\file. This PR simply enables us to take advantage of this interpretation, which is built into the Windows API functions we already use.

@kyllingstad kyllingstad added the bug Something isn't working label Feb 26, 2024
@kyllingstad kyllingstad self-assigned this Feb 26, 2024
@kyllingstad kyllingstad force-pushed the bugfix/619-unc-path-uris branch from ba97425 to fc067cd Compare February 26, 2024 10:56
Copy link
Member

@eidekrist eidekrist left a comment

Choose a reason for hiding this comment

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

I'm not in a position to test this myself, but LGTM!

@kyllingstad
Copy link
Member Author

The original issue (#619) is difficult to recreate in unittests too, but I did test locally on my machine that this PR solves it. (That is, I was able to run a simulation with an UNC path to OspSystemStructure.xml.)

@kyllingstad kyllingstad merged commit 5d5bc35 into master Feb 28, 2024
20 checks passed
@kyllingstad kyllingstad deleted the bugfix/619-unc-path-uris branch February 28, 2024 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants