mirror of
https://github.com/Eugeny/tabby.git
synced 2024-12-23 02:22:02 +03:00
15 lines
484 B
TypeScript
Executable File
15 lines
484 B
TypeScript
Executable File
import * as path from 'path'
|
|
import * as fs from 'fs'
|
|
import * as electron from 'electron'
|
|
|
|
const appPath = path.dirname(electron.app.getPath('exe'))
|
|
|
|
if (fs.existsSync(path.join(appPath, 'terminus-data'))) {
|
|
fs.renameSync(path.join(appPath, 'terminus-data'), path.join(appPath, 'data'))
|
|
}
|
|
const portableData = path.join(appPath, 'data')
|
|
if (fs.existsSync(portableData)) {
|
|
console.log('reset user data to ' + portableData)
|
|
electron.app.setPath('userData', portableData)
|
|
}
|