Hi, I’m hitting the dangling and following symlink when I try to purge a workspace via gradle. I tried using project.delete and then switched to ant. I guess, I need to use java.nio to identifiy and unlink first then use project delete.
// Unlink
directoryToPurge.eachFileRecurse { child ->
if (Files.isSymbolicLink(Paths.get(child.absolutePath))) {
ant.symlink(link: child.absolutePath, action: ant.symlink.delete) {
failonerror=true
}
}
}
ant.delete() {
verbose = true
removeNotFollowedSymlinks = false
ant.fileset(dir: localWorkingCopy.absolutePath, includes: "**" ) {
followsymlinks
= false
}
}