Skip to content

Commit

Permalink
use vscode-uri to get path from uri
Browse files Browse the repository at this point in the history
  • Loading branch information
antico5 committed Apr 19, 2023
1 parent 429a03b commit 3b1a965
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/src/frameworks/Truffle/TruffleProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import _ from "lodash";
import path from "path";
import semver from "semver";
import { DidChangeWatchedFilesParams } from "vscode-languageserver-protocol";
import { URI } from "vscode-uri";
import { OpenDocuments, ServerState } from "../../types";
import { isRelativeImport } from "../../utils";
import { directoryContains } from "../../utils/directoryContains";
Expand Down Expand Up @@ -239,7 +240,11 @@ export class TruffleProject extends Project {
public async onWatchedFilesChanges({
changes,
}: DidChangeWatchedFilesParams): Promise<void> {
if (!changes.some((change) => change.uri.endsWith(this.configPath))) {
if (
!changes.some(
(change) => URI.parse(change.uri).fsPath === this.configPath
)
) {
return;
}

Expand Down

0 comments on commit 3b1a965

Please sign in to comment.