Skip to content

Command line script name not recognized as Windows UNC path #42779

@lrhn

Description

@lrhn

A command line like:

dart \\?\d:\something\something\lang\dart\temp\pwd.dart

gives the error:

Crash when compiling file://?/d:/something/something/lang/dart/temp/pwd.dart,
at character offset null:
Unsupported operation: Cannot extract a file path from a URI with a query component
#0      _Uri.toFilePath (dart:core/uri.dart:2713:7)
#1      new File.fromUri (dart:io/file.dart:265:49)
...

The path is a valid Windows path. It is treated as a URI, which is wrong, it should be converted to a URI explicitly in a way which preserves the ?, likely file://%25/d:/something/something/lang/dart/temp\pwd.dart or just file:///d:/something/something/lang/dart/temp/pwd.dart.

Metadata

Metadata

Assignees

Labels

area-dart-cliUse area-dart-cli for issues related to the 'dart' command like tool.crashProcess exits with SIGSEGV, SIGABRT, etc. An unhandled exception is not a crash.legacy-area-front-endLegacy: Use area-dart-model instead.os-windows

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions