Skip to content

Commit

Permalink
Fix for bug JENKINS-12496
Browse files Browse the repository at this point in the history
  • Loading branch information
emanuelez committed Jan 24, 2012
1 parent 6aea5c2 commit d6c3012
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/java/org/jenkinsci/plugins/periodicbackup/ConfigOnly.java
Expand Up @@ -72,6 +72,17 @@ public Iterable<File> getFilesToBackup() throws PeriodicBackupException {
File jobConfig = new File(job, "config.xml");
if(jobConfig.exists() && jobConfig.isFile()) {
filesToBackup.add(jobConfig);
// There might be some config file from the Promotion plugin
File promotionDir = new File(job, "promotions");
if(promotionDir.exists()) {
File[] promotionDirs = promotionDir.listFiles((FileFilter) FileFilterUtils.directoryFileFilter());
for (File dir : promotionDirs) {
File promotionConfig = new File(dir, "config.xml");
if(promotionConfig.exists() && promotionConfig.isFile()) {
filesToBackup.add(promotionConfig);
}
}
}
}
else {
LOGGER.warning(jobConfig.getAbsolutePath() + " does not exist or is not a file.");
Expand Down

0 comments on commit d6c3012

Please sign in to comment.