Remove fs.promises.rmdir (#21356)

* Remove fs.promises.rmdir

* Add force flag
This commit is contained in:
Sakshi Sharma
2022-12-12 11:04:31 -08:00
committed by GitHub
parent c1e97cd9ff
commit 2626f24d5a

View File

@@ -964,7 +964,7 @@ export class Project implements ISqlProject {
const toDeleteFolders: FileProjectEntry[] = this._files.filter(x => x.fsUri.fsPath.startsWith(entry.fsUri.fsPath) && x.type === EntryType.Folder);
await Promise.all(toDeleteFiles.map(x => fs.unlink(x.fsUri.fsPath)));
await Promise.all(toDeleteFolders.map(x => fs.rmdir(x.fsUri.fsPath, { recursive: true })));
await Promise.all(toDeleteFolders.map(x => fs.rm(x.fsUri.fsPath, { recursive: true, force: true })));
await this.exclude(entry);
}