File parameters no longer overwrite previous files
@@ -172,6 +172,12 @@ public class FileParameterValue extends ParameterValue {
}
FilePath locationFilePath = ws.child(location);
locationFilePath.getParent().mkdirs();
+
+ // TODO Remove this workaround after FILEUPLOAD-293 is resolved.
+ if (locationFilePath.exists() && !locationFilePath.isDirectory()) {
+ locationFilePath.delete();
+ }
+
locationFilePath.copyFrom(file);
locationFilePath.copyTo(new FilePath(getLocationUnderBuild(build)));
}
