Skip to content
Permalink
Browse files

JENKINS-16426: back up only directorys in the job directory

  • Loading branch information
tofuatjava committed Jan 21, 2013
1 parent 9308ef1 commit cfe9e2dc71f92e2bc291798fd2ea16dfcb7515f0
Showing with 25 additions and 2 deletions.
  1. +24 −1 pom.xml
  2. +1 −1 src/main/java/org/jvnet/hudson/plugins/thinbackup/backup/HudsonBackup.java
25 pom.xml
@@ -111,6 +111,28 @@
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-core</artifactId>
<version>1.409</version>
<exclusions>
<exclusion>
<artifactId>junit</artifactId>
<groupId>junit</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-test-harness</artifactId>
<version>1.409</version>
<exclusions>
<exclusion>
<artifactId>junit</artifactId>
<groupId>junit</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<distributionManagement>
<repository>
@@ -125,8 +147,9 @@
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<version>3.0.0</version>
<executions>
<execution>
<id>default-testCompile</id>
@@ -177,7 +177,7 @@ private void backupJobsDirectory(final File jobsDirectory, final File jobsBackup

for (final String jobName : jobNames) {
final File jobDirectory = new File(jobsDirectory, jobName);
if (jobDirectory.exists()) { // sub jobs e.g. maven modules need not be copied
if (jobDirectory.exists() && jobDirectory.isDirectory()) { // sub jobs e.g. maven modules need not be copied
if (jobDirectory.canRead()) {
File childJobsFolder = new File(jobDirectory, HudsonBackup.JOBS_DIR_NAME);
if (childJobsFolder.exists()) { // found CloudBeesFolder

0 comments on commit cfe9e2d

Please sign in to comment.