.. shouldn't traverse past a drive letter for file URLs
Opened this issue · 5 comments
nex3 commented
According to the WHATWG URL spec, ..
shouldn't traverse past a drive letter if it's the only component in a file
URL's path.
nex3 commented
Yes, it's still relevant. For example:
import 'package:path/path.dart' as p;
main() {
print(p.url.normalize('file:///C:/..'));
}
This should print file:///C:
, but it currently prints file://
.
jddeep commented
I see well we can solve this with some string manipulation and checks for these drive letters and return the path accordingly from the normalize function of the context.dart
file. What do you say?
nex3 commented
Again, I'm no longer the maintainer of this package, so I recommend asking @natebosch.
natebosch commented
I think this is worth fixing, I don't yet have an understanding of the best fix.