[ 
https://issues.apache.org/jira/browse/SOLR-4288?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Steve Rowe updated SOLR-4288:
-----------------------------

    Fix Version/s:     (was: 4.1)
                   4.2
    
> FileDataSource with an empty basePath and a relative resource is broken.
> ------------------------------------------------------------------------
>
>                 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to