Skip to content

Commit

Permalink
complete: dismiss fix on windows (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
moshfeu authored Apr 2, 2024
1 parent 8409922 commit 47fa11b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
15 changes: 8 additions & 7 deletions src/providers/foldersCompareProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,12 @@ export class CompareFoldersProvider implements TreeDataProvider<File> {
};

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();
Expand Down Expand Up @@ -189,8 +187,11 @@ export class CompareFoldersProvider implements TreeDataProvider<File> {
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);
});
}

Expand Down

0 comments on commit 47fa11b

Please sign in to comment.