Remove extra leading slashes in the flutter tool snapshot path#7291
Remove extra leading slashes in the flutter tool snapshot path#7291jason-simmons merged 1 commit intoflutter:masterfrom
Conversation
Dart will parse this path as a URI, and multiple leading slashes will cause that part of the path to be parsed as an authority. Fixes flutter#7279 Also see dart-lang/sdk#28143
|
Won't this break on Windows where you can have UNC paths with two leading slashes? |
|
I guess I don't understand where the multiple slashes are coming from. It seems like fixing the source would be the more correct fix. |
|
I see, on Unix // is a valid string at the start of a path. |
|
Do we have a testing story for this script? I guess not... |
|
Is this just a temporary workaround until the dart vm handles //path/to/thing.dart correctly? |
|
It's not clear what the intent of the Dart command line tool is. Currently the tool is assuming that the dart-script-file argument is a URI, thus making //path/to/thing.dart invalid. If Dart intends to treat dart-script-file as a filesystem path, then the tool would need to convert //path/to/thing.dart into a valid URI. More info at dart-lang/sdk#28143 |
Dart will parse this path as a URI, and multiple leading slashes will cause
that part of the path to be parsed as an authority.
Fixes #7279
Also see dart-lang/sdk#28143