Skip to content

Commit

Permalink
fix: scanning root (#828) (#829)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yanpas committed Feb 19, 2020
1 parent 02bd516 commit 5cf1387
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/source_control_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export class SourceControlManager implements IDisposable {
);
const onPossibleSvnRepositoryChange = filterEvent(
onWorkspaceChange,
uri => !this.getRepository(uri)
uri => uri.scheme === "file" && !this.getRepository(uri)
);
onPossibleSvnRepositoryChange(
this.onPossibleSvnRepositoryChange,
Expand Down
6 changes: 4 additions & 2 deletions src/watchers/repositoryFilesWatcher.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Event, Uri, workspace, EventEmitter } from "vscode";
import { watch } from "fs";
import { exists } from "../fs";
import { join } from "path";
import { join, resolve } from "path";
import { debounce } from "../decorators";
import { anyEvent, filterEvent, IDisposable, isDescendant } from "../util";

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

constructor(readonly root: string) {
const fsWatcher = workspace.createFileSystemWatcher("**");
const fsWatcher = workspace.createFileSystemWatcher(
join(resolve(root), "**")
);
this._onRepoChange = new EventEmitter<Uri>();
this._onRepoCreate = new EventEmitter<Uri>();
this._onRepoDelete = new EventEmitter<Uri>();
Expand Down

0 comments on commit 5cf1387

Please sign in to comment.