mirror of
https://github.com/Sebclem/hassio-nextcloud-backup.git
synced 2024-12-18 04:27:18 +01:00
Fix clean not working for webdav
This commit is contained in:
parent
af7c90c839
commit
82d3473761
@ -27,6 +27,9 @@ actionRouter.post("/clean", (req, res) => {
|
||||
.then(() => {
|
||||
return clean(backupConfig);
|
||||
})
|
||||
.then(() => {
|
||||
return webdavClean(backupConfig, webdavConfig);
|
||||
})
|
||||
.then(() => {
|
||||
logger.info("All good !");
|
||||
})
|
||||
|
@ -644,7 +644,7 @@ export function clean(backupConfig: BackupConfig, webdavConfig: WebdavConfig) {
|
||||
status.status = States.CLEAN_CLOUD;
|
||||
status.progress = -1;
|
||||
statusTools.setStatus(status);
|
||||
const limit = backupConfig.autoClean.homeAssistant.nbrToKeep || 5;
|
||||
const limit = backupConfig.autoClean.webdav.nbrToKeep || 5;
|
||||
return getBackups(pathTools.auto, webdavConfig, backupConfig.nameTemplate)
|
||||
.then((backups) => {
|
||||
if (backups.length > limit) {
|
||||
|
Loading…
Reference in New Issue
Block a user