sftp.rebuild does not need options anymore
This commit is contained in:
12
src/sftp.js
12
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
|
||||
|
||||
Reference in New Issue
Block a user