mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-09 05:50:08 +00:00
fixed #2048
This commit is contained in:
parent
8f361f841c
commit
be09e7829f
@ -13,15 +13,12 @@ if (!process.env.TERMINUS_PLUGINS) {
|
|||||||
|
|
||||||
const application = new Application()
|
const application = new Application()
|
||||||
|
|
||||||
const portableData = path.join(`${process.env.PORTABLE_EXECUTABLE_DIR}`, 'data')
|
if (process.env.PORTABLE_EXECUTABLE_DIR) {
|
||||||
if (('PORTABLE_EXECUTABLE_DIR' in process.env) && fs.existsSync(portableData)) {
|
const portableData = path.join(process.env.PORTABLE_EXECUTABLE_DIR, 'terminus-data')
|
||||||
fs.stat(portableData, (err, stats) => {
|
if (!fs.existsSync(portableData)) {
|
||||||
if (stats.isDirectory()) {
|
fs.mkdirSync(portableData)
|
||||||
app.setPath('userData' ,portableData)
|
}
|
||||||
} else {
|
app.setPath('userData', portableData)
|
||||||
console.warn(err)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ipcMain.on('app:new-window', () => {
|
ipcMain.on('app:new-window', () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user