Permalink
Browse files

use jenkin's built-in deleteFile, since it does a better job of delet…

…ing read-only files
  • Loading branch information...
1 parent 3dfd6fa commit f23c53e3f992df19be5568e65ba673ed6ce4fe23 @rpetti committed May 21, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/main/java/hudson/plugins/perforce/QuickCleanerCall.java
@@ -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());

0 comments on commit f23c53e

Please sign in to comment.