Github user pmouawad commented on a diff in the pull request:
https://github.com/apache/jmeter/pull/202#discussion_r60310491
--- Diff: src/components/org/apache/jmeter/control/IncludeController.java
---
@@ -121,19 +121,20 @@ protected HashTree loadIncludedElements() {
final String includePath = getIncludePath();
HashTree tree = null;
if (includePath != null && includePath.length() > 0) {
+ String fileName=prefix+includePath;
try {
- String fileName=prefix+includePath;
+
File file = new File(fileName);
final String absolutePath = file.getAbsolutePath();
log.info("loadIncludedElements -- try to load included
module: "+absolutePath);
if(!file.exists() && !file.isAbsolute()){
log.info("loadIncludedElements -failed for:
"+absolutePath);
file = new
File(FileServer.getFileServer().getBaseDir(), includePath);
log.info("loadIncludedElements -Attempting to read it
from: " + file.getAbsolutePath());
- if(!file.exists()){
+ if(!file.canRead() || !file.isFile()){
--- End diff --
Hi,
Why do you replace !file.exists() by !file.canRead() || !file.isFile()
Thanks
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---