-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Hudson 1.363
To reproduce:
- Create a build with a file parameter. Set the file location to be under a subdirectory of the workspace, i.e. "dir/fileParam".
- Start a build through the web interface and provide a file.
- The following stack trace appears in the build console output:
Copying file to dir/fileParam FATAL: C:\Users\Steve\.hudson\jobs\test\workspace\dir\fileParam (The system cannot find the path specified) java.io.FileNotFoundException: C:\Users\Steve\.hudson\jobs\test\workspace\dir\fileParam (The system cannot find the path specified) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(Unknown Source) at java.io.FileOutputStream.<init>(Unknown Source) at org.apache.commons.fileupload.disk.DiskFileItem.write(DiskFileItem.java:416) at hudson.FilePath.copyFrom(FilePath.java:690) at hudson.model.FileParameterValue$1.setUp(FileParameterValue.java:85) at hudson.model.Build$RunnerImpl.doRun(Build.java:132) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416) at hudson.model.Run.run(Run.java:1241) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:124)
The build is successful if the file is provided via the CLI, since the DiskFileItem class is not used in that case.
It is also successful when the file location is directly under the workspace root directory.
Code changed in hudson
User: : StevenGBrown
Path:
trunk/hudson/main/core/src/main/java/hudson/model/FileParameterValue.java
trunk/www/changelog.html
http://jenkins-ci.org/commit/32393
Log:
[FIXED JENKINS-6889] FileParameterValue now creates the directory that the file parameter is copied into, since DiskFileItem does not.