Merge pull request #16 from Candunc/master

Added OS X support for file caching
This commit is contained in:
Jiiks 2015-10-27 23:26:35 +02:00
commit 44a9f642c5
1 changed files with 9 additions and 1 deletions

View File

@ -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;