Skip to content

Commit e134f7b

Browse files
committed
fix(profile): resolve EBUSY error during profile switching and bump to 0.12.2
- Refine directory detection to target specific subfolders instead of the entire global storage root. - Add error handling to skip locked or busy files during profile restoration. - Update CHANGELOG with version 0.12.2 details.
1 parent bd7775f commit e134f7b

File tree

3 files changed

+19
-15
lines changed

3 files changed

+19
-15
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to the **Antigravity Storage Manager** extension will be doc
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.12.2] - 2026-02-01
9+
### Profile Switching
10+
- **EBUSY Fix**: Resolved a common error during profile switching where locked files (like the .NET runtime) in the `globalStorage` directory would block the entire operation.
11+
- **Improved Detection**: The extension now specifically targets Antigravity and Codeium configuration subdirectories instead of scanning the entire global storage root, significantly reducing the chance of encountering locked files from other extensions.
12+
- **Robustness**: Added automatic skipping for busy or locked files (`EBUSY`/`EPERM`), allowing the profile switch to complete successfully even when some non-critical files are in use.
13+
814
## [0.12.1] - 2026-02-01
915
### Port Detection (Windows 11)
1016
- **Stability Fix**: Resolved a critical issue in `PortDetector` on Windows 11 where the "Failed to get/decrypt manifest" error frequently occurred due to `findstr` pipe failures. Switched to direct `netstat -ano` output processing in TypeScript for 100% reliability.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "antigravity-storage-manager",
33
"displayName": "Antigravity Storage Manager",
44
"description": "Securely sync Antigravity Conversations with Google Drive. Features Telegram Bot notifications, Multi-Account Profile Switching, Real-time Quota Monitoring, MCP Server Status validation, and advanced backup tools.",
5-
"version": "0.12.1",
5+
"version": "0.12.2",
66
"publisher": "unchase",
77
"author": {
88
"name": "unchase"

src/profileManager.ts

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,13 @@ export class ProfileManager {
2929

3030
const candidates: string[] = [];
3131

32-
// 1. Standalone App (Official Agent) - Highest Priority
33-
const standalonePaths = [
34-
path.join(roaming, 'Antigravity', 'User', 'globalStorage'),
35-
path.join(roaming, 'Codeium', 'User', 'globalStorage')
36-
];
37-
38-
for (const p of standalonePaths) {
39-
candidates.push(p);
40-
}
41-
42-
// 2. VS Code Extensions
32+
// 2. VS Code Extensions & Standalone apps
4333
// Try common locations for extensions global storage
4434
const commonRoots = [
4535
path.join(roaming, 'Code', 'User', 'globalStorage'),
4636
path.join(roaming, 'Code - Insiders', 'User', 'globalStorage'),
47-
// Antigravity IDE specific?
48-
path.join(roaming, 'Antigravity', 'User', 'globalStorage')
37+
path.join(roaming, 'Antigravity', 'User', 'globalStorage'),
38+
path.join(roaming, 'Codeium', 'User', 'globalStorage')
4939
];
5040

5141
for (const storageRoot of commonRoots) {
@@ -317,7 +307,15 @@ export class ProfileManager {
317307
this.copyRecursiveSync(path.join(src, childItemName), path.join(dest, childItemName));
318308
});
319309
} else {
320-
fs.copyFileSync(src, dest);
310+
try {
311+
fs.copyFileSync(src, dest);
312+
} catch (e: any) {
313+
if (e.code === 'EBUSY' || e.code === 'EPERM') {
314+
console.warn(`Skipping locked file: ${src}`);
315+
} else {
316+
throw e;
317+
}
318+
}
321319
}
322320
}
323321

0 commit comments

Comments
 (0)