mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-20 02:18:01 +00:00
keep a backup of the config file
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user