mirror of
https://github.com/Sebclem/hassio-nextcloud-backup.git
synced 2024-11-22 09:12:58 +01:00
🔨 Clean at the end of upload
This commit is contained in:
parent
cdcbac4bc6
commit
4dec2579f5
@ -8,6 +8,7 @@ const configPath = "./webdav_conf.json"
|
||||
const path = require('path');
|
||||
const settingsTools = require('./settingsTools');
|
||||
const pathTools = require('./pathTools');
|
||||
const hassioApiTools = require('./hassioApiTools');
|
||||
|
||||
const request = require('request');
|
||||
|
||||
@ -202,7 +203,17 @@ class WebdavTools {
|
||||
|
||||
statusTools.setStatus(status);
|
||||
cleanTempFolder();
|
||||
let autoCleanCloud = settingsTools.getSettings().auto_clean_backup;
|
||||
if (autoCleanCloud != null && autoCleanCloud == "true") {
|
||||
this.clean().catch();
|
||||
}
|
||||
let autoCleanlocal = settingsTools.getSettings().auto_clean_local;
|
||||
if (autoCleanlocal != null && autoCleanlocal == "true") {
|
||||
hassioApiTools.clean();
|
||||
}
|
||||
resolve();
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user