// * <FileName>_valid.log - the output of the "check_validity.py" script
QDir dir(myLastBackupFolder);
QStringList files = dir.entryList(QDir::Files|QDir::Dirs|QDir::NoDotAndDotDot);
- if (!files.isEmpty() && files.length() <= 3) {
+ if (!files.isEmpty() && files.length() <= 5) {
QString baseName = files.constFirst();
baseName = baseName.left(baseName.lastIndexOf('.'));
- if (!baseName.isEmpty() && files.filter(baseName).length() == files.length())
+ if (!baseName.isEmpty() && files.filter(baseName).length() == files.length()) {
+ MSGEL("........removing old backup folder");
dir.removeRecursively();
+ }
}
}
myLastBackupFolder = aFolder;
if (useBackup) {
int backupInterval = aResMgr->integerValue( ModuleBase_Preferences::GENERAL_SECTION, "backup_interval", 1 );
if ( backupInterval > 0 ){
- backupInterval = 1;
+#ifdef DBG_BACKUP_INTERVAL
+ backupInterval = DBG_BACKUP_INTERVAL; // MBS: use shorter interval for debugging
+#endif
MSGEL("....starting BackupTimer: interval=" << backupInterval << " min");
myBackupTimer->start( backupInterval*60000 );
}