Only mount app data volumes if localstorage is used

This commit is contained in:
Johannes Zellner
2020-07-29 19:50:08 +02:00
parent 0a44d426fa
commit 74bdb6cb9d

View File

@@ -40,7 +40,7 @@ function rebuild(options, callback) {
let dataDirs = [];
result.forEach(function (app) {
if (!app.dataDir) return;
if (!app.manifest.addons['localstorage']) return;
if (options.ignoredApps && options.ignoredApps.indexOf(app.id) !== -1) {
debug(`Ignoring volume for ${app.id}`);
@@ -49,7 +49,7 @@ function rebuild(options, callback) {
dataDirs.push({
hostDir: app.dataDir || path.join(paths.APPS_DATA_DIR, app.id, 'data'),
// /data is required since this is where the localstorage data would be in APPS_DATA_DIR
// FIXME data/ prefix can be dropped if sftp addon code is changed
mountDir: `/app/data/${app.id}/data`
});
});