diff --git a/package.json b/package.json index 08f5dea..a56081a 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "compare-folders", "displayName": "Compare Folders", "description": "Compare folders by contents, present the files that have differences and display the diffs side by side", - "version": "0.24.2", + "version": "0.24.3", "repository": { "type": "git", "url": "https://github.com/moshfeu/vscode-compare-folders" diff --git a/src/providers/foldersCompareProvider.ts b/src/providers/foldersCompareProvider.ts index 21ee4c6..7a77cab 100644 --- a/src/providers/foldersCompareProvider.ts +++ b/src/providers/foldersCompareProvider.ts @@ -73,14 +73,12 @@ export class CompareFoldersProvider implements TreeDataProvider { }; dismissDifference = async (e: TreeItem) => { - const isWindows = process.platform === 'win32'; - let {path} = e.resourceUri || {}; + const { path } = e.resourceUri || {}; + if (!path) { return; } - if(isWindows && e.resourceUri?.scheme){ - path = `${e.resourceUri?.scheme}:${path}`; - } + this.ignoreDifferencesList.add(path); this.filterIgnoredFromDiffs(); await this.updateUI(); @@ -189,8 +187,11 @@ export class CompareFoldersProvider implements TreeDataProvider { private filterIgnoredFromDiffs() { this._diffs!.distinct = this._diffs!.distinct .filter(diff => { - return !this.ignoreDifferencesList.has(diff[0]) && - !this.ignoreDifferencesList.has(diff[1]); + const { path: path1 } = Uri.parse(diff[0]); + const { path: path2 } = Uri.parse(diff[1]); + + return !this.ignoreDifferencesList.has(path1) && + !this.ignoreDifferencesList.has(path2); }); }