fix(portable): fix error on renaming portable directory
This commit is contained in:
parent
0f2a7b44dd
commit
07f3ab2bd9
@ -211,6 +211,12 @@ console.log('Sphinx Path:', sphinxPath)
|
||||
const startSphinx = (callback) => {
|
||||
const sphinxConfigDirectory = app.getPath("userData")
|
||||
appConfig['dbPath'] = appConfig.dbPath && appConfig.dbPath.length > 0 ? appConfig.dbPath : sphinxConfigDirectory;
|
||||
// on portable dir can move database directory
|
||||
if(!fs.existsSync(appConfig.dbPath) && fs.existsSync(sphinxConfigDirectory))
|
||||
{
|
||||
appConfig['dbPath'] = sphinxConfigDirectory
|
||||
}
|
||||
|
||||
writeSphinxConfig(sphinxConfigDirectory, appConfig.dbPath)
|
||||
|
||||
const config = `${sphinxConfigDirectory}/sphinx.conf`
|
||||
|
Loading…
Reference in New Issue
Block a user