mirror of
https://github.com/Eugeny/tabby
synced 2024-11-15 01:17:14 +00:00
11 lines
341 B
TypeScript
Executable file
11 lines
341 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'))
|
|
|
|
const portableData = path.join(appPath, 'data')
|
|
if (fs.existsSync(portableData)) {
|
|
console.log('reset user data to ' + portableData)
|
|
electron.app.setPath('userData', portableData)
|
|
}
|