Skip to content

Commit b90ee53

Browse files
authored
Merge pull request #574 from lockdown-systems/fix-create-folder
fix: create target folder if it doesn't exist
2 parents 4a2f797 + ef3ac25 commit b90ee53

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/account_x/x_account_controller.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2391,6 +2391,8 @@ export class XAccountController {
23912391
this.refreshAccount();
23922392
} else {
23932393
// Only rename if the new folder doesn't already exist
2394+
// `getAccountDataPath` creates the account data path if it doesn't exist
2395+
const newAccountDataPath = getAccountDataPath("X", username);
23942396
try {
23952397
// Move all content recursively from old directory to new directory
23962398
if (fs.existsSync(oldAccountDataPath)) {

0 commit comments

Comments
 (0)