Added OS X support for file caching

This commit is contained in:
Duncan Bristow 2015-10-27 15:14:09 -06:00
parent 9e70538497
commit 3787d3fcac
1 changed files with 9 additions and 1 deletions

View File

@ -24,9 +24,17 @@ var _userDefault = {"cache": null};
var _userConfig = {"cache": null};
var _cacheExpired = false;
var _cacheDays = 0;
var _dataPath = "../BetterDiscordData";
var _dataPath;
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) {
_mainWindow = mainWindow;
_version = _config.Core.Version;