Merge pull request #16 from Candunc/master
Added OS X support for file caching
This commit is contained in:
commit
44a9f642c5
|
@ -24,9 +24,17 @@ var _userDefault = {"cache": null};
|
||||||
var _userConfig = {"cache": null};
|
var _userConfig = {"cache": null};
|
||||||
var _cacheExpired = false;
|
var _cacheExpired = false;
|
||||||
var _cacheDays = 0;
|
var _cacheDays = 0;
|
||||||
var _dataPath = "../BetterDiscordData";
|
var _dataPath;
|
||||||
var _userFile = _dataPath + "/user.json";
|
var _userFile = _dataPath + "/user.json";
|
||||||
|
|
||||||
|
// OS specific _dataPath
|
||||||
|
var _os = process.platform;
|
||||||
|
if (_os == "win32") {
|
||||||
|
_dataPath = "../BetterDiscordData";
|
||||||
|
} else if (_os == "darwin") {
|
||||||
|
_dataPath = "~/Library/Application Support/discord/BetterDiscordData";
|
||||||
|
}
|
||||||
|
|
||||||
function BetterDiscord(mainWindow) {
|
function BetterDiscord(mainWindow) {
|
||||||
_mainWindow = mainWindow;
|
_mainWindow = mainWindow;
|
||||||
_version = _config.Core.Version;
|
_version = _config.Core.Version;
|
||||||
|
|
Loading…
Reference in New Issue