Merge pull request #3510 from github/aeisenberg/flush-archive-files

Flush archive file systems when removed
This commit is contained in:
Andrew Eisenberg
2024-03-26 08:11:36 -07:00
committed by GitHub

View File

@@ -242,6 +242,17 @@ export class ArchiveFileSystemProvider implements FileSystemProvider {
root = new Directory("");
constructor() {
// When a file system archive is removed from the workspace, we should
// also remove it from our cache.
workspace.onDidChangeWorkspaceFolders((event) => {
for (const removed of event.removed) {
const zipPath = removed.uri.fsPath;
this.archives.delete(zipPath);
}
});
}
// metadata
async stat(uri: Uri): Promise<FileStat> {