Skip to content

Commit 83d81d2

Browse files
edgardmessiasJohnstonCode
authored andcommitted
feat: Automatic close repository when folder not exists (#587)
1 parent 8621d6d commit 83d81d2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/repository.ts

+6
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import {
2727
SvnUriAction
2828
} from "./common/types";
2929
import { debounce, globalSequentialize, memoize, throttle } from "./decorators";
30+
import { exists } from "./fs";
3031
import { configuration } from "./helpers/configuration";
3132
import OperationsImpl from "./operationsImpl";
3233
import { PathNormalizer } from "./pathNormalizer";
@@ -952,6 +953,11 @@ export class Repository implements IRemoteRepository {
952953
this.state = RepositoryState.Disposed;
953954
}
954955

956+
const rootExists = await exists(this.workspaceRoot);
957+
if (!rootExists) {
958+
await commands.executeCommand("svn.close", this);
959+
}
960+
955961
throw err;
956962
} finally {
957963
this._operations.end(operation);

0 commit comments

Comments
 (0)