mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-10 10:36:21 +00:00
Add path filter support to PathRemover
This allows for simplifying FilePath to use PathRemover rather than duplicating logic. Signed-off-by: Matt Sicker <boards@gmail.com>
This commit is contained in:
1 parent
301ba7af51
commit
59880c2fcd
4 files changed
+47
-19
No files matched your search
@@ -1271,7 +1271,7 @@ public final class FilePath implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Override
|
||||
public Void invoke(File f, VirtualChannel channel) throws IOException {
|
||||
Util.deleteRecursive(deleting(f));
|
||||
Util.deleteRecursive(fileToPath(f), path -> deleting(path.toFile()).delete());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1286,7 +1286,7 @@ public final class FilePath implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Override
|
||||
public Void invoke(File f, VirtualChannel channel) throws IOException {
|
||||
Util.deleteContentsRecursive(deleting(f));
|
||||
Util.deleteContentsRecursive(fileToPath(f), path -> deleting(path.toFile()).delete());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user