app.session.username = result.body.username;
app.session.valid = true;
- callback();
+ superagent.get('/api/settings').query({ access_token: localStorage.accessToken }).end(function (error, result) {
+ if (error) console.error(error);
+
+ app.folderListingEnabled = !!result.body.folderListingEnabled;
+
+ callback();
+ });
});
}
if (error) return console.error(error);
loadDirectory(window.location.hash.slice(1));
-
- superagent.get('/api/settings').query({ access_token: localStorage.accessToken }).end(function (error, result) {
- if (error) console.error(error);
-
- app.folderListingEnabled = !!result.body.folderListingEnabled;
- });
});
$(window).on('hashchange', function () {
var rootFolder = path.resolve(__dirname, process.argv[2] || 'files');
-var configFile = path.resolve(__dirname, process.argv[3] || './config.json');
+var configFile = path.resolve(__dirname, process.argv[3] || '.config.json');
// Ensure the root folder exists
mkdirp.sync(rootFolder);