{
if (previousFile != null)
{
- ret = ret && moveFileToFile(backupfile_n, previousFile);
+ // using boolean '&' instead of '&&' as don't want moveFileToFile
+ // attempt to be conditional (short-circuit)
+ ret = ret & moveFileToFile(backupfile_n, previousFile);
}
}
suffix, digits);
Cache.log.debug("BACKUPFILES Moving old file [" + file
+ "] to latestBackupFilename [" + latestBackupFilename + "]");
- ret |= moveFileToFile(file, new File(latestBackupFilename));
+ // using boolean '&' instead of '&&' as don't want moveFileToFile attempt to
+ // be conditional (short-circuit)
+ ret = ret & moveFileToFile(file, new File(latestBackupFilename));
Cache.log.debug(
"BACKUPFILES moving " + file + " to " + latestBackupFilename
+ " was " + (ret ? "" : "NOT ") + "successful");