filemanager: fix mounting of filesystem and mountpoint backends

This commit is contained in:
Girish Ramakrishnan
2021-12-24 10:43:39 -08:00
parent 66fd05ce47
commit 5e9a46d71e
4 changed files with 5 additions and 5 deletions

View File

@@ -64,7 +64,7 @@ async function start(existingInfra) {
for (const app of allApps) {
if (!app.manifest.addons['localstorage'] || !app.dataDir) continue;
const hostDir = apps.getDataDir(app, app.dataDir), mountDir = `/mnt/${app.id}`;
const hostDir = apps.getDataDir(app, app.dataDir), mountDir = `/mnt/app-${app.id}`; // see also sftp:userSearchSftp
if (!safe.fs.existsSync(hostDir)) { // this can fail if external mount does not have permissions for yellowtent user
// do not create host path when cloudron is restoring. this will then create dir with root perms making restore logic fail
debug(`Ignoring app data dir ${hostDir} for ${app.id} since it does not exist`);
@@ -85,7 +85,7 @@ async function start(existingInfra) {
continue;
}
dataDirs.push({ hostDir: volume.hostPath, mountDir: `/mnt/${volume.id}` });
dataDirs.push({ hostDir: volume.hostPath, mountDir: `/mnt/volume-${volume.id}` });
}
// mail data dir