Skip to content

Commit 5cf1387

Browse files
authored
fix: scanning root (#828) (#829)
1 parent 02bd516 commit 5cf1387

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/source_control_manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export class SourceControlManager implements IDisposable {
141141
);
142142
const onPossibleSvnRepositoryChange = filterEvent(
143143
onWorkspaceChange,
144-
uri => !this.getRepository(uri)
144+
uri => uri.scheme === "file" && !this.getRepository(uri)
145145
);
146146
onPossibleSvnRepositoryChange(
147147
this.onPossibleSvnRepositoryChange,

src/watchers/repositoryFilesWatcher.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Event, Uri, workspace, EventEmitter } from "vscode";
22
import { watch } from "fs";
33
import { exists } from "../fs";
4-
import { join } from "path";
4+
import { join, resolve } from "path";
55
import { debounce } from "../decorators";
66
import { anyEvent, filterEvent, IDisposable, isDescendant } from "../util";
77

@@ -28,7 +28,9 @@ export class RepositoryFilesWatcher implements IDisposable {
2828
public onDidSvnAny: Event<Uri>;
2929

3030
constructor(readonly root: string) {
31-
const fsWatcher = workspace.createFileSystemWatcher("**");
31+
const fsWatcher = workspace.createFileSystemWatcher(
32+
join(resolve(root), "**")
33+
);
3234
this._onRepoChange = new EventEmitter<Uri>();
3335
this._onRepoCreate = new EventEmitter<Uri>();
3436
this._onRepoDelete = new EventEmitter<Uri>();

0 commit comments

Comments
 (0)