diff --git a/src/apptaskmanager.js b/src/apptaskmanager.js index a278ceef3..d3e49dbbe 100644 --- a/src/apptaskmanager.js +++ b/src/apptaskmanager.js @@ -77,7 +77,7 @@ function scheduleTask(appId, taskId, callback) { locker.unlock(locker.OP_APPTASK); // unlock event will trigger next task // post app task hooks - sftp.rebuild({}, function (error) { + sftp.rebuild(function (error) { if (error) console.error('Unable to rebuild sftp:', error); }); }); diff --git a/src/sftp.js b/src/sftp.js index 686a27be4..208b12506 100644 --- a/src/sftp.js +++ b/src/sftp.js @@ -19,16 +19,13 @@ function startSftp(existingInfra, callback) { if (existingInfra.version === infra.version && infra.images.sftp.tag === existingInfra.images.sftp.tag) return callback(); - rebuild({}, callback); + rebuild(callback); } -// options only supports ignoredApps = [ appId ] -function rebuild(options, callback) { +function rebuild(callback) { assert.strictEqual(typeof options, 'object'); assert.strictEqual(typeof callback, 'function'); - if (options.ignoredApps) assert(Array.isArray(options.ignoredApps), 'Expecting ignoredApps to be an array'); - debug('rebuilding container'); const tag = infra.images.sftp.tag; @@ -41,11 +38,6 @@ function rebuild(options, callback) { result.forEach(function (app) { if (!app.manifest.addons['localstorage']) return; - if (options.ignoredApps && options.ignoredApps.indexOf(app.id) !== -1) { - debug(`Ignoring volume for ${app.id}`); - return; - } - const hostDir = apps.getDataDir(app, app.dataDir), mountDir = `/app/data/${app.id}`; if (!safe.fs.existsSync(hostDir)) { // do not create host path when cloudron is restoring. this will then create dir with root perms making restore logic fail