Skip to content

Commit 741f587

Browse files
Copilotalexr00
andcommitted
Add comment documenting readState limitation for multi-root workspaces
Added a comment to readState noting that it currently only supports the first workspace folder, and that it should accept a repositoryUri parameter if multi-root support is needed in the future. Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
1 parent 2798f43 commit 741f587

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/common/temporaryState.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ export class TemporaryState extends vscode.Disposable {
8282

8383
private async readState(subpath: string, filename: string): Promise<Uint8Array> {
8484
let filePath: vscode.Uri = this.path;
85+
// Note: readState currently only supports the first workspace folder
86+
// If this method is needed for multi-root workspace support in the future,
87+
// it should accept a repositoryUri parameter like writeState does
8588
const workspace = (vscode.workspace.workspaceFolders && vscode.workspace.workspaceFolders.length > 0)
8689
? vscode.workspace.workspaceFolders[0].name : undefined;
8790

0 commit comments

Comments
 (0)