mirror of
https://github.com/coder/code-server.git
synced 2024-12-25 10:41:55 +03:00
Create data directory path before moving old directory there
This commit is contained in:
parent
e1dc6967ed
commit
ba37a34fa2
@ -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}`);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user