-
Notifications
You must be signed in to change notification settings - Fork 637
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
Fix uri parse error in the Windows system. #2251
base: main
Are you sure you want to change the base?
Conversation
Windows local path parse error. D:\test\relative\image.jpg
Here the uri.path is empty, so the FileUriFetcher factory can't be found. |
@Test | ||
fun windows() { | ||
val uri = "D:\\test\\relative\\image.jpg".toUri() | ||
assertNull(uri.scheme) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it correct that scheme is null? Should it be D
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it correct that scheme is null? Should it be
D
?
I think D is the volume information, it should be part of the path.
Thanks for taking a stab at this - unfortunately looks like the tests are failing with a |
There was an error and I fixed it, and it has been submitted. |
Sorry for the delay on merging this. After thinking about this I think we might want to handle Windows file paths a different way. Changing the |
Yes, I don't think my approach is very elegant, but I can't think of a better way to handle this, looking forward to your solutions. |
Please run
./test.sh
before submitting to ensure your pull request passes the automated checks.