Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 56361E409 for ; Tue, 15 Jan 2013 21:48:14 +0000 (UTC) Received: (qmail 99656 invoked by uid 500); 15 Jan 2013 21:48:13 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 99610 invoked by uid 500); 15 Jan 2013 21:48:13 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 99598 invoked by uid 99); 15 Jan 2013 21:48:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Jan 2013 21:48:13 +0000 Date: Tue, 15 Jan 2013 21:48:12 +0000 (UTC) From: "Steve Rowe (JIRA)" To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (SOLR-4288) FileDataSource with an empty basePath and a relative resource is broken. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org