🌐 AI搜索 & 代理 主页
Skip to content

Failure to read files from workspace roots via DTD on Windows #5210

@DanTup

Description

@DanTup

Not sure if this is a DTD or Dart-Code issue, but on beta we have test failures because we try to read files with slightly different formats of file URI (for example encoded colon vs not), but get a failure for a not-encoded colon:

==> {"id":"3","jsonrpc":"2.0","method":"FileSystem.readFileAsString","params":{"uri":"file:///c%3A/Dev/Dart-Code/Dart-Code/src/test/test_projects/hello_world/bin/main.dart"}}
<== {"jsonrpc":"2.0","result":{"type":"FileContent","content":"<SNIP>"},"id":"3"}
==> {"id":"4","jsonrpc":"2.0","method":"FileSystem.readFileAsString","params":{"uri":"file:///C:/Dev/Dart-Code/Dart-Code/src/test/test_projects/hello_world/bin/main.dart"}}
<== {"jsonrpc":"2.0","error":{"code":142,"message":"Permission denied","data":{"request":{"id":"4","jsonrpc":"2.0","method":"FileSystem.readFileAsString","params":{"uri":"file:///C:/Dev/Dart-Code/Dart-Code/src/test/test_projects/hello_world/bin/main.dart"}}}},"id":"4"}

Workspace roots were sent with the colon:

==> {"id":"2","jsonrpc":"2.0","method":"FileSystem.getIDEWorkspaceRoots","params":{}}
<== {"jsonrpc":"2.0","result":{"type":"IDEWorkspaceRoots","ideWorkspaceRoots":["file:///c%3A/Dev/Dart-Code/Dart-Code/src/test/test_projects/hello_world"]},"id":"2"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions