Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

muon would quit if 'userData' path is not exist #516

Open
miaulightouch opened this issue Mar 4, 2018 · 0 comments
Open

muon would quit if 'userData' path is not exist #516

miaulightouch opened this issue Mar 4, 2018 · 0 comments

Comments

@miaulightouch
Copy link

  • muon version: 5.0.6
  • Operating system: Windows 10
// set userData path manually, muon is not using package name as path to save user data.
const userDataPath = path.join(
  app.getPath('userData'),
  isDev ? '.' : `../${productName}`)

// set path
app.setPath('userData', userDataPath)

muon would be closed by itself if the path is not exist. even muon created the folder.

I must add these code before set path

// create folder manually, muon won't create this properly.
fs.existsSync(userDataPath) || fs.mkdirSync(userDataPath)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant