diff --git a/server.js b/server.js index 02cb54029..17e793f29 100644 --- a/server.js +++ b/server.js @@ -165,7 +165,7 @@ app.get('/api/config', function(req, res){ res.send('define(function(){\n' + [ 'var obj = ' + JSON.stringify({ requireConf: { - waitSeconds: 60, + waitSeconds: 600, urlArgs: 'ver=' + Package.version + (FRESH_KEY? '-' + FRESH_KEY: '') + (DEV_MODE? '-' + (+new Date()): ''), }, removeDonateButton: (config.removeDonateButton === true), diff --git a/www/common/sframe-common-outer.js b/www/common/sframe-common-outer.js index 6009b35cc..6dca13630 100644 --- a/www/common/sframe-common-outer.js +++ b/www/common/sframe-common-outer.js @@ -188,13 +188,13 @@ define([ if (val) { password = val; - Cryptpad.getFileSize(window.location.href, password, function (e, size) { + Cryptpad.getFileSize(window.location.href, password, waitFor(function (e, size) { if (size !== 0) { return void todo(); } // Wrong password or deleted file? askPassword(true); - }); + })); } else { askPassword(); } diff --git a/www/common/userObject.js b/www/common/userObject.js index fb39eb484..d97607c1a 100644 --- a/www/common/userObject.js +++ b/www/common/userObject.js @@ -37,7 +37,14 @@ define([ var logError = config.logError || logging; var debug = exp.debug = config.debug || logging; var error = exp.error = function() { - exp.fixFiles(); + if (sframeChan) { + return void sframeChan.query("Q_DRIVE_USEROBJECT", { + cmd: "fixFiles", + data: {} + }, function () {}); + } else if (typeof (exp.fixFiles) === "function") { + exp.fixFiles(); + } console.error.apply(console, arguments); };