mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-03-10 23:15:00 +08:00
fix(config): Using fs.resolve as path.join
This commit is contained in:
parent
072490ebcc
commit
d8f1d9d9fe
1 changed files with 2 additions and 2 deletions
|
@ -23,12 +23,12 @@ export default class ConfigPersistenceManager {
|
|||
initializeConfigDirectory() {
|
||||
if (!fs.existsSync(this.configDirPath)) {
|
||||
fs.makeTreeSync(this.configDirPath);
|
||||
const templateConfigDirPath = fs.resolve(this.resourcePath, 'dot-nylas');
|
||||
const templateConfigDirPath = path.join(this.resourcePath, 'dot-nylas');
|
||||
fs.copySync(templateConfigDirPath, this.configDirPath);
|
||||
}
|
||||
|
||||
if (!fs.existsSync(this.configFilePath)) {
|
||||
const templateConfigPath = fs.resolve(this.resourcePath, 'dot-nylas', 'config.json');
|
||||
const templateConfigPath = path.join(this.resourcePath, 'dot-nylas', 'config.json');
|
||||
const templateConfig = fs.readFileSync(templateConfigPath);
|
||||
fs.writeFileSync(this.configFilePath, templateConfig);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue