Fix bug in reload - data dir was not present. fix #119

This commit is contained in:
walterhiggins 2014-02-16 18:29:15 +00:00
parent 2e4516bf69
commit 5bec21d381
2 changed files with 10 additions and 1 deletions

View file

@ -1,3 +1,9 @@
# 2014 02 11
## Version 2.0.4
Various bug fixes, enhanced classroom module and improved error logging on startup.
# 2014 01 17
Added support for communication with Arduino and other devices which

View file

@ -515,7 +515,10 @@ function __onEnable ( __engine, __plugin, __script )
/*
now that load is defined, use it to load a global config object
*/
var config = _load( new File(jsPluginsRootDir, 'data/global-config.json' ) );
var configFile = new File(jsPluginsRootDir, 'data/');
configFile.mkdirs();
configFile = new File(configFile,'global-config.json');
var config = _load( configFile );
if ( !config ) {
config = { verbose: false };
}