You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2018/11/03 22:31:43 UTC

[Bug 62878] includecontroller.prefix fails when path separator not added

https://bz.apache.org/bugzilla/show_bug.cgi?id=62878

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om
             Status|NEW                         |NEEDINFO

--- Comment #1 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
(In reply to Andrew Burton from comment #0)
> Specifying the includecontroller.prefix fails if the property or the
> specified include filename don't end/start with a path separator.
> 
> For example:
> includecontroller.prefix=/path/to/fragments
> Include Controller filename = myfragment.jmx
> results in the log message:
> \"/path/to/fragmentsmyfragment.jmx\" not found for Include Controller
> \"Include Controller - My Fragment\"
> 
> This is due to the string append used in IncludeController.java:
> 
> String fileName=prefix+includePath;
> File file = new File(fileName);
> 
> Suggest the code be amended to:
> 
> File file = Paths.get(prefix, includePath).toFile();
> 
> This way, the user input is handled gracefully. This assumes that the prefix
> is a directory.

Thanks for report and analysis.

Still, I see nowhere in documentation that "includecontroller.prefix" MUST be a
folder. 
So if we implement your proposal (which I find a good proposal), we could break
existing plans.
Did you see in current documentation that would confirm
includecontroller.prefix should be a folder ? If yes, we could apply your
proposal without risk.

Thanks

-- 
You are receiving this mail because:
You are the assignee for the bug.