filesystem: rename backupFolder to backupDir

This commit is contained in:
Girish Ramakrishnan
2025-08-02 10:37:37 +02:00
parent 4fcaae8053
commit 547d8ae113
13 changed files with 66 additions and 49 deletions
+3 -3
View File
@@ -127,13 +127,13 @@ async function getFilesystems() {
for (const backupTarget of await backupTargets.list(1, 100)) {
if (backupTarget.provider === 'filesystem') {
const [, dfResult] = await safe(df.file(backupTarget.config.backupFolder));
const [, dfResult] = await safe(df.file(backupTarget.config.backupDir));
const filesystem = dfResult?.filesystem || rootDisk.filesystem;
if (filesystems[filesystem]) filesystems[filesystem].contents.push({ type: 'cloudron-backup', id: backupTarget.id, path: backupTarget.config.backupFolder });
if (filesystems[filesystem]) filesystems[filesystem].contents.push({ type: 'cloudron-backup', id: backupTarget.id, path: backupTarget.config.backupDir });
}
// often the default backup dir is not cleaned up
if (backupTarget.provider !== 'filesystem' || backupTarget.config.backupFolder !== paths.DEFAULT_BACKUP_DIR) {
if (backupTarget.provider !== 'filesystem' || backupTarget.config.backupDir !== paths.DEFAULT_BACKUP_DIR) {
const [, dfResult] = await safe(df.file(paths.DEFAULT_BACKUP_DIR));
const filesystem = dfResult?.filesystem || rootDisk.filesystem;
if (filesystems[filesystem]) filesystems[filesystem].contents.push({ type: 'cloudron-backup-default', id: 'cloudron-backup-default', path: paths.DEFAULT_BACKUP_DIR });