mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-08 13:30:02 +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> {
|
||||
const tempPath = this.configPath + '.new'
|
||||
await fs.writeFile(tempPath, content, 'utf8')
|
||||
await fs.writeFile(this.configPath + '.backup', content, 'utf8')
|
||||
await promisify(gracefulFS.rename)(tempPath, this.configPath)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user