Skip to content

Commit

Permalink
Fix schema resolution using Samba share on Windows (#3313)
Browse files Browse the repository at this point in the history
* Fix schema resolution using Samba share on Windows

* Change replaceAll to replace with regex global
  • Loading branch information
edoren authored Jan 4, 2025
1 parent 53fd7ad commit f045f50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/language-service/src/schemas/schemaService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class SchemaServiceForIncludes {
if (relatedPathToSchemaMapping) {
const id = `http://schemas.home-assistant.io/${relatedPathToSchemaMapping.key}`;
let absolutePath = fs.realpathSync.native(haFiles[sourceFile].filename);
absolutePath = absolutePath.replace("\\", "/");
absolutePath = absolutePath.replace(new RegExp("\\", "g"), "/");

Check failure on line 63 in src/language-service/src/schemas/schemaService.ts

View workflow job for this annotation

GitHub Actions / VS Code Extension

Invalid regular expression: /\/: \ at end of pattern
const fileass = encodeURI(absolutePath);
let resultEntry = results.find((x) => x.uri === id);

Expand Down

0 comments on commit f045f50

Please sign in to comment.