Skip to content

Commit

Permalink
use jenkin's built-in deleteFile, since it does a better job of delet…
Browse files Browse the repository at this point in the history
…ing read-only files
  • Loading branch information
rpetti committed May 21, 2012
1 parent 3dfd6fa commit f23c53e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/hudson/plugins/perforce/QuickCleanerCall.java
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ private boolean safelyDelete(File file) throws IOException {
File testPath = file.getCanonicalFile();
while ((testPath = testPath.getParentFile()) != null) {
if (testPath.equals(parent)) {
return file.delete();
Util.deleteFile(file);
return true;
}
}
log("Warning, file outside workspace not cleaned: " + file.getPath());
Expand Down

0 comments on commit f23c53e

Please sign in to comment.