Skip to content

Commit

Permalink
feat: Automatic close repository when folder not exists (#587)
Browse files Browse the repository at this point in the history
  • Loading branch information
edgardmessias authored and JohnstonCode committed May 29, 2019
1 parent 8621d6d commit 83d81d2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
SvnUriAction
} from "./common/types";
import { debounce, globalSequentialize, memoize, throttle } from "./decorators";
import { exists } from "./fs";
import { configuration } from "./helpers/configuration";
import OperationsImpl from "./operationsImpl";
import { PathNormalizer } from "./pathNormalizer";
Expand Down Expand Up @@ -952,6 +953,11 @@ export class Repository implements IRemoteRepository {
this.state = RepositoryState.Disposed;
}

const rootExists = await exists(this.workspaceRoot);
if (!rootExists) {
await commands.executeCommand("svn.close", this);
}

throw err;
} finally {
this._operations.end(operation);
Expand Down

0 comments on commit 83d81d2

Please sign in to comment.