Skip to content

yaml.schemas setting: breaking regression when using encoded file URLs on Windows #1274

Description

@phaumer

Describe the bug

In our VS Code extension we are programmatically updating the "yaml.schema" setting when your extension is installed to point to a local schema that ships with our extension to support offline usage. We use the standard VS Code API to serialize the schema URL with

resultUrl = vscode.Uri.file(absoluteSchemaPath).toString();

This returns in Windows a file URL that encodes the colon such as this: file:///c%3A/Users/user1/.vscode/extensions/ibm.zopeneditor-6.6.1/resources/zapp-schema-1.10.2.json

This used to work for years, but a recent update to the extension must have broken this. It now requires to use : instead of %3A. However, both are valid URL.

Expected Behavior

Support both : and %3A

Current Behavior

The schema is not found

Steps to Reproduce

  1. On Windows add a file URL with a url encoded schema location
  2. Open a yaml file that would use the schema

Environment

  • Windows
  • Mac
  • Linux
  • other (please specify)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions