Rebuild sftp addon after an apptask
This commit is contained in:
@@ -43,7 +43,6 @@ var addons = require('./addons.js'),
|
||||
rimraf = require('rimraf'),
|
||||
safe = require('safetydance'),
|
||||
settings = require('./settings.js'),
|
||||
sftp = require('./sftp.js'),
|
||||
shell = require('./shell.js'),
|
||||
superagent = require('superagent'),
|
||||
sysinfo = require('./sysinfo.js'),
|
||||
@@ -578,9 +577,6 @@ function install(app, args, progressCallback, callback) {
|
||||
|
||||
startApp.bind(null, app),
|
||||
|
||||
progressCallback.bind(null, { percent: 80, message: 'Configuring file manager' }),
|
||||
sftp.rebuild.bind(null, {}),
|
||||
|
||||
progressCallback.bind(null, { percent: 85, message: 'Waiting for DNS propagation' }),
|
||||
exports._waitForDnsPropagation.bind(null, app),
|
||||
|
||||
@@ -743,11 +739,7 @@ function migrateDataDir(app, args, progressCallback, callback) {
|
||||
return updateApp(app, { installationState: apps.ISTATE_ERROR, error: makeTaskError(error, app) }, callback.bind(null, error));
|
||||
}
|
||||
|
||||
// We do this after the app has the new data commited to the database
|
||||
sftp.rebuild({}, function (error) {
|
||||
if (error) debug('migrateDataDir: failed to rebuild sftp addon:', error);
|
||||
callback();
|
||||
});
|
||||
callback();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -782,9 +774,6 @@ function configure(app, args, progressCallback, callback) {
|
||||
|
||||
startApp.bind(null, app),
|
||||
|
||||
progressCallback.bind(null, { percent: 80, message: 'Configuring file manager' }),
|
||||
sftp.rebuild.bind(null, {}),
|
||||
|
||||
progressCallback.bind(null, { percent: 90, message: 'Configuring reverse proxy' }),
|
||||
configureReverseProxy.bind(null, app),
|
||||
|
||||
@@ -887,9 +876,6 @@ function update(app, args, progressCallback, callback) {
|
||||
|
||||
startApp.bind(null, app),
|
||||
|
||||
progressCallback.bind(null, { percent: 80, message: 'Configuring file manager' }),
|
||||
sftp.rebuild.bind(null, {}),
|
||||
|
||||
progressCallback.bind(null, { percent: 100, message: 'Done' }),
|
||||
updateApp.bind(null, app, { installationState: apps.ISTATE_INSTALLED, error: null, health: null, updateTime: new Date() })
|
||||
], function seriesDone(error) {
|
||||
@@ -993,10 +979,6 @@ function uninstall(app, args, progressCallback, callback) {
|
||||
addons.teardownAddons.bind(null, app, app.manifest.addons),
|
||||
|
||||
progressCallback.bind(null, { percent: 40, message: 'Cleanup file manager' }),
|
||||
function (callback) {
|
||||
if (!app.dataDir) return callback();
|
||||
sftp.rebuild({ ignoredApps: [ app.id ] }, callback);
|
||||
},
|
||||
|
||||
progressCallback.bind(null, { percent: 50, message: 'Deleting app data directory' }),
|
||||
deleteAppDir.bind(null, app, { removeDirectory: true }),
|
||||
|
||||
Reference in New Issue
Block a user