mirror of
https://github.com/Sebclem/hassio-nextcloud-backup.git
synced 2024-09-12 00:39:06 +02: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 path = require('path');
|
||||||
const settingsTools = require('./settingsTools');
|
const settingsTools = require('./settingsTools');
|
||||||
const pathTools = require('./pathTools');
|
const pathTools = require('./pathTools');
|
||||||
|
const hassioApiTools = require('./hassioApiTools');
|
||||||
|
|
||||||
const request = require('request');
|
const request = require('request');
|
||||||
|
|
||||||
@ -202,7 +203,17 @@ class WebdavTools {
|
|||||||
|
|
||||||
statusTools.setStatus(status);
|
statusTools.setStatus(status);
|
||||||
cleanTempFolder();
|
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();
|
resolve();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user