Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 16704b2
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -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(){
Expand Down

0 comments on commit 16704b2

Please sign in to comment.