Skip to content

Commit 38879b6

Browse files
authored
cleanup only generated folders for removed extensions (microsoft#182028)
microsoft#181671 cleanup only generated folders for removed extensions
1 parent 8fcf1c0 commit 38879b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vs/platform/extensionManagement/node/extensionManagementService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ export class ExtensionsScanner extends Disposable {
531531

532532
async removeExtension(extension: ILocalExtension | IScannedExtension, type: string): Promise<void> {
533533
this.logService.trace(`Deleting ${type} extension from disk`, extension.identifier.id, extension.location.fsPath);
534-
const renamedLocation = this.uriIdentityService.extUri.joinPath(this.uriIdentityService.extUri.dirname(extension.location), `.${generateUuid()}`);
534+
const renamedLocation = this.uriIdentityService.extUri.joinPath(this.uriIdentityService.extUri.dirname(extension.location), `._${generateUuid()}`);
535535
await this.rename(extension.identifier, extension.location.fsPath, renamedLocation.fsPath, Date.now() + (2 * 60 * 1000) /* Retry for 2 minutes */);
536536
await this.fileService.del(renamedLocation, { recursive: true });
537537
this.logService.info('Deleted from disk', extension.identifier.id, extension.location.fsPath);
@@ -706,7 +706,7 @@ export class ExtensionsScanner extends Disposable {
706706
}
707707
}
708708
for (const child of stat?.children ?? []) {
709-
if (child.isDirectory && child.name.startsWith('.') && isUUID(child.name.substring(1))) {
709+
if (child.isDirectory && child.name.startsWith('._') && isUUID(child.name.substring(2))) {
710710
promises.push((async () => {
711711
this.logService.trace('Deleting the generated extension folder', child.resource.toString());
712712
try {

0 commit comments

Comments
 (0)