Add "cache" and "userCache" directories
This commit is contained in:
parent
9a04f67c0a
commit
ce52a87477
5 changed files with 14 additions and 2 deletions
|
@ -67,6 +67,10 @@ int GetPathConstant(const std::string& name) {
|
|||
return brightray::DIR_APP_DATA;
|
||||
else if (name == "userData")
|
||||
return brightray::DIR_USER_DATA;
|
||||
else if (name == "cache")
|
||||
return brightray::DIR_CACHE;
|
||||
else if (name == "userCache")
|
||||
return brightray::DIR_USER_CACHE;
|
||||
else if (name == "home")
|
||||
return base::DIR_HOME;
|
||||
else
|
||||
|
|
|
@ -42,6 +42,7 @@ if (option.file && !option.webdriver) {
|
|||
else if (packageJson.name)
|
||||
app.setName(packageJson.name);
|
||||
app.setPath('userData', path.join(app.getPath('appData'), app.getName()));
|
||||
app.setPath('userCache', path.join(app.getPath('cache'), app.getName()));
|
||||
}
|
||||
|
||||
// Run the app.
|
||||
|
|
|
@ -90,8 +90,9 @@ process.once 'BIND_DONE', ->
|
|||
else
|
||||
app.setDesktopName '#{app.getName()}.desktop'
|
||||
|
||||
# Set the user data path according to application's name.
|
||||
# Set the user path according to application's name.
|
||||
app.setPath 'userData', path.join(app.getPath('appData'), app.getName())
|
||||
app.setPath 'userCache', path.join(app.getPath('cache'), app.getName())
|
||||
|
||||
# Load the chrome extension support.
|
||||
require './chrome-extension.js'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue