mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-14 16:40:05 +00:00
ensure config saves don't overwrite each other
This commit is contained in:
parent
bf893551c8
commit
3eb4bd53a9
@ -119,7 +119,7 @@ export class ElectronPlatformService extends PlatformService {
|
||||
}
|
||||
|
||||
async _saveConfigInternal (content: string): Promise<void> {
|
||||
const tempPath = this.configPath + '.new'
|
||||
const tempPath = this.configPath + '.new.' + Date.now().toString()
|
||||
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