File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
src/main/java/io/jenkins/plugins/file_parameters Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change 3434import hudson .model .ParameterValue ;
3535import hudson .model .Run ;
3636import hudson .model .TaskListener ;
37+ import java .io .File ;
3738import java .io .FilterInputStream ;
3839import java .io .IOException ;
3940import java .io .InputStream ;
@@ -59,14 +60,9 @@ public final String getFilename() {
5960 }
6061
6162 final void setFilename (String filename ) {
62- try {
63- Jenkins .checkGoodName (filename );
64- this .filename = filename ;
65- } catch (Failure x ) {
66- // Ignore and leave the filename undefined.
67- // FileItem.getName Javadoc claims Opera might pass a full path.
68- // This is a best effort anyway (scripts should be written to tolerate an undefined name).
69- }
63+ // FileItem.getName Javadoc claims Opera might pass a full path, so strip to just the name.
64+ // This is a best effort anyway (scripts should be written to tolerate an undefined name).
65+ this .filename = new File (filename ).getName ();
7066 }
7167
7268 protected InputStream open (@ CheckForNull Run <?,?> build ) throws IOException , InterruptedException {
You can’t perform that action at this time.
0 commit comments