Skip to content
Permalink
Browse files
Avoid to delete unexistent paths [JENKINS-37500]
Signed-off-by: Marco Nenciarini <marco.nenciarini@2ndquadrant.it>
Signed-off-by: Giulio Calacoci <giulio.calacoci@2ndquadrant.it>
  • Loading branch information
mnencia committed Nov 3, 2016
1 parent dcd8be1 commit 16704b24a41986145e3b2b51330733b20b13d435
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/main/java/hudson/plugins/scm_sync_configuration/model/ChangeSet.java
@@ -58,8 +58,10 @@ public void registerPath(String path) {
public void registerPathForDeletion(String path){
// We should determine if path is a directory by watching scm path (and not hudson path) because in most of time,
// when we are here, directory is already deleted in hudson hierarchy...
boolean isDirectory = new Path(path).getScmFile().isDirectory();
pathsToDelete.add(new Path(path, isDirectory));
if(new Path(path).getScmFile().exists()) {
boolean isDirectory = new Path(path).getScmFile().isDirectory();
pathsToDelete.add(new Path(path, isDirectory));
}
}

public boolean isEmpty(){

0 comments on commit 16704b2

Please sign in to comment.