mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-08 21:40:03 +00:00
keep a backup of the config file
This commit is contained in:
parent
8d0bcb94b1
commit
d5c9e1e9f6
@ -120,6 +120,7 @@ export class ElectronPlatformService extends PlatformService {
|
|||||||
async _saveConfigInternal (content: string): Promise<void> {
|
async _saveConfigInternal (content: string): Promise<void> {
|
||||||
const tempPath = this.configPath + '.new'
|
const tempPath = this.configPath + '.new'
|
||||||
await fs.writeFile(tempPath, content, 'utf8')
|
await fs.writeFile(tempPath, content, 'utf8')
|
||||||
|
await fs.writeFile(this.configPath + '.backup', content, 'utf8')
|
||||||
await promisify(gracefulFS.rename)(tempPath, this.configPath)
|
await promisify(gracefulFS.rename)(tempPath, this.configPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user