diff --git a/packages/server/src/cli.ts b/packages/server/src/cli.ts index b44cdc4ad..10f19dc44 100644 --- a/packages/server/src/cli.ts +++ b/packages/server/src/cli.ts @@ -55,6 +55,7 @@ export class Entry extends Command { if (!fs.existsSync(dataDir)) { const oldDataDir = path.resolve(path.join(os.homedir(), ".code-server")); if (fs.existsSync(oldDataDir)) { + await mkdirP(path.basename(dataDir)); fs.renameSync(oldDataDir, dataDir); logger.info(`Moved data directory from ${oldDataDir} to ${dataDir}`); }