[jira] [Updated] (SOLR-4288) Improve logging for FileDataSource (basePath, relative resources).
[ https://issues.apache.org/jira/browse/SOLR-4288?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dawid Weiss updated SOLR-4288: -- Summary: Improve logging for FileDataSource (basePath, relative resources). (was: FileDataSource with an empty basePath and a relative resource is broken.) Improve logging for FileDataSource (basePath, relativeresources). - Key: SOLR-4288 URL: https://issues.apache.org/jira/browse/SOLR-4288 Project: Solr Issue Type: Bug Affects Versions: 4.0 Reporter: Dawid Weiss Priority: Minor Fix For: 4.2, 5.0 In fact, the logic is broken: {code} if (!file.isAbsolute()) file = new File(basePath + query); {code} because basePath is null so 'null' is concatenated with the query string (path) resulting in an invalid path. It should be checked if basePath is null, if so default to .? Then resolve relative location as: {code} new File(basePathFile, query); {code} I'd also say change the log so that the absolute path is also logged in the warning message, otherwise it's really hard to figure out what's going on. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-4288) Improve logging for FileDataSource (basePath, relative resources).
[ https://issues.apache.org/jira/browse/SOLR-4288?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dawid Weiss updated SOLR-4288: -- Attachment: SOLR-4288.patch I'd like to squeeze this one in for 4.1. It's a fairly trivial patch and improves the user experience if somebody needs to configure DIH with relative basedir/paths. I'll commit to trunk -- if there are no objections, could you merge-in to the release branch, Steve? Improve logging for FileDataSource (basePath, relativeresources). - Key: SOLR-4288 URL: https://issues.apache.org/jira/browse/SOLR-4288 Project: Solr Issue Type: Bug Affects Versions: 4.0 Reporter: Dawid Weiss Priority: Minor Fix For: 4.2, 5.0 Attachments: SOLR-4288.patch In fact, the logic is broken: {code} if (!file.isAbsolute()) file = new File(basePath + query); {code} because basePath is null so 'null' is concatenated with the query string (path) resulting in an invalid path. It should be checked if basePath is null, if so default to .? Then resolve relative location as: {code} new File(basePathFile, query); {code} I'd also say change the log so that the absolute path is also logged in the warning message, otherwise it's really hard to figure out what's going on. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Updated] (SOLR-4288) Improve logging for FileDataSource (basePath, relative resources).
[ https://issues.apache.org/jira/browse/SOLR-4288?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dawid Weiss updated SOLR-4288: -- Fix Version/s: (was: 4.2) 4.1 Assignee: Dawid Weiss Improve logging for FileDataSource (basePath, relativeresources). - Key: SOLR-4288 URL: https://issues.apache.org/jira/browse/SOLR-4288 Project: Solr Issue Type: Bug Affects Versions: 4.0 Reporter: Dawid Weiss Assignee: Dawid Weiss Priority: Minor Fix For: 4.1, 5.0 Attachments: SOLR-4288.patch In fact, the logic is broken: {code} if (!file.isAbsolute()) file = new File(basePath + query); {code} because basePath is null so 'null' is concatenated with the query string (path) resulting in an invalid path. It should be checked if basePath is null, if so default to .? Then resolve relative location as: {code} new File(basePathFile, query); {code} I'd also say change the log so that the absolute path is also logged in the warning message, otherwise it's really hard to figure out what's going on. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org