Return-Path: Delivered-To: apmail-ws-tuscany-commits-archive@locus.apache.org Received: (qmail 51997 invoked from network); 4 Jun 2008 08:22:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Jun 2008 08:22:44 -0000 Received: (qmail 12347 invoked by uid 500); 4 Jun 2008 08:22:47 -0000 Delivered-To: apmail-ws-tuscany-commits-archive@ws.apache.org Received: (qmail 12326 invoked by uid 500); 4 Jun 2008 08:22:47 -0000 Mailing-List: contact tuscany-commits-help@ws.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: tuscany-dev@ws.apache.org Delivered-To: mailing list tuscany-commits@ws.apache.org Received: (qmail 12317 invoked by uid 99); 4 Jun 2008 08:22:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jun 2008 01:22:47 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jun 2008 08:22:06 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 8598423889FF; Wed, 4 Jun 2008 01:22:23 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r663029 - /incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/ContributionCollectionImpl.java Date: Wed, 04 Jun 2008 08:22:23 -0000 To: tuscany-commits@ws.apache.org From: jsdelfino@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080604082223.8598423889FF@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jsdelfino Date: Wed Jun 4 01:22:22 2008 New Revision: 663029 URL: http://svn.apache.org/viewvc?rev=663029&view=rev Log: Convert Windows specific paths (containing backslashes and spaces for example) to correct URIs. Modified: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/ContributionCollectionImpl.java Modified: incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/ContributionCollectionImpl.java URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/ContributionCollectionImpl.java?rev=663029&r1=663028&r2=663029&view=diff ============================================================================== --- incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/ContributionCollectionImpl.java (original) +++ incubator/tuscany/sandbox/sebastien/java/sca-test2/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/ContributionCollectionImpl.java Wed Jun 4 01:22:22 2008 @@ -346,11 +346,17 @@ // Create a contribution entry, skip the domain root directory and childrens of the // domain root directory String rootLocationPath = rootLocation.getPath(); - String locationPath = location.getPath(); + if (rootLocationPath.indexOf('\\') != -1 || rootLocationPath.indexOf(' ') != -1) { + rootLocationPath = new File(rootLocationPath.replace('\\', '/')).toURI().toString(); + } + String locationPath = location.getPath(); + if (locationPath.indexOf('\\') != -1 || locationPath.indexOf(' ') != -1) { + locationPath = new File(locationPath.replace('\\', '/')).toURI().toString(); + } if (!locationPath.startsWith(rootLocationPath + "/") && !locationPath.equals(rootLocationPath)) { Contribution contribution = contributionFactory.createContribution(); contribution.setURI(uri); - contribution.setLocation(location.getPath()); + contribution.setLocation(locationPath); entries.add(entry(suggestionWorkspace, contribution)); } }