Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 13178 invoked from network); 31 Mar 2010 13:08:49 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 31 Mar 2010 13:08:49 -0000 Received: (qmail 23500 invoked by uid 500); 31 Mar 2010 13:08:48 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 23462 invoked by uid 500); 31 Mar 2010 13:08:48 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 23455 invoked by uid 99); 31 Mar 2010 13:08:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Mar 2010 13:08:48 +0000 X-ASF-Spam-Status: No, hits=-1183.0 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Mar 2010 13:08:47 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 207FD234C4B9 for ; Wed, 31 Mar 2010 13:08:27 +0000 (UTC) Message-ID: <928100122.602841270040907128.JavaMail.jira@brutus.apache.org> Date: Wed, 31 Mar 2010 13:08:27 +0000 (UTC) From: "Shai Erera (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Resolved: (LUCENE-2353) Config incorrectly handles Windows absolute pathnames In-Reply-To: <1303846526.530381269726147115.JavaMail.jira@brutus.apache.org> 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/LUCENE-2353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shai Erera resolved LUCENE-2353. -------------------------------- Resolution: Fixed Committed revision 929520. > Config incorrectly handles Windows absolute pathnames > ----------------------------------------------------- > > Key: LUCENE-2353 > URL: https://issues.apache.org/jira/browse/LUCENE-2353 > Project: Lucene - Java > Issue Type: Bug > Components: contrib/benchmark > Reporter: Shai Erera > Assignee: Shai Erera > Fix For: 3.1 > > Attachments: LUCENE-2353.patch, LUCENE-2353.patch > > > I have no idea how no one ran into this so far, but I tried to execute an .alg file which used ReutersContentSource and referenced both docs.dir and work.dir as Windows absolute pathnames (e.g. d:\something). Surprisingly, the run reported an error of missing content under benchmark\work\something. > I've traced the problem back to Config, where get(String, String) includes the following code: > {code} > if (sval.indexOf(":") < 0) { > return sval; > } > // first time this prop is extracted by round > int k = sval.indexOf(":"); > String colName = sval.substring(0, k); > sval = sval.substring(k + 1); > ... > {code} > It detects ":" in the value and so it thinks it's a per-round property, thus stripping "d:" from the value ... fix is very simple: > {code} > if (sval.indexOf(":") < 0) { > return sval; > } else if (sval.indexOf(":\\") >= 0) { > // this previously messed up absolute path names on Windows. Assuming > // there is no real value that starts with \\ > return sval; > } > // first time this prop is extracted by round > int k = sval.indexOf(":"); > String colName = sval.substring(0, k); > sval = sval.substring(k + 1); > {code} > I'll post a patch w/ the above fix + test shortly. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org