mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 19:18:59 +01:00
git file system should wait for model to be initialized
This commit is contained in:
@@ -133,6 +133,8 @@ export class GitFileSystemProvider implements FileSystemProvider {
|
||||
}
|
||||
|
||||
async stat(uri: Uri): Promise<FileStat> {
|
||||
await this.model.isInitialized;
|
||||
|
||||
const { submoduleOf, path, ref } = fromGitUri(uri);
|
||||
const repository = submoduleOf ? this.model.getRepository(submoduleOf) : this.model.getRepository(uri);
|
||||
if (!repository) {
|
||||
@@ -158,6 +160,8 @@ export class GitFileSystemProvider implements FileSystemProvider {
|
||||
}
|
||||
|
||||
async readFile(uri: Uri): Promise<Uint8Array> {
|
||||
await this.model.isInitialized;
|
||||
|
||||
const { path, ref, submoduleOf } = fromGitUri(uri);
|
||||
|
||||
if (submoduleOf) {
|
||||
|
||||
Reference in New Issue
Block a user