You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2002/02/18 14:03:38 UTC

cvs commit: xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/connector Resource.java

cziegeler    02/02/18 05:03:38

  Modified:    src/scratchpad/src/org/apache/cocoon/sunshine/connector
                        Resource.java
  Log:
  Fixed file uri handling
  
  Revision  Changes    Path
  1.2       +5 -5      xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/connector/Resource.java
  
  Index: Resource.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/sunshine/connector/Resource.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Resource.java	18 Feb 2002 09:10:08 -0000	1.1
  +++ Resource.java	18 Feb 2002 13:03:38 -0000	1.2
  @@ -67,7 +67,7 @@
    * parameters.
    *
    * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
  - * @version CVS $Id: Resource.java,v 1.1 2002/02/18 09:10:08 cziegeler Exp $
  + * @version CVS $Id: Resource.java,v 1.2 2002/02/18 13:03:38 cziegeler Exp $
   */
   public final class Resource
   implements Serializable {
  @@ -96,9 +96,9 @@
               try {
                   source = resolver.resolve(identifier);
                   identifier = source.getSystemId();
  -                if ( identifier.startsWith("file:/") ) {
  +                if ( identifier.startsWith("file:") ) {
                       this.resourceType = ResourceConnector.RESOURCE_TYPE_FILE;
  -                    this.resourceIdentifier = identifier.substring("file:/".length());
  +                    this.resourceIdentifier = identifier.substring("file:".length());
                   } else {
                       this.resourceType = ResourceConnector.RESOURCE_TYPE_URI;
                       this.resourceIdentifier = identifier;
  @@ -114,9 +114,9 @@
                   // FIXME (CZ)
                   throw new ProcessingException("Relative cocoon: URIs currently not supported.");
               }
  -            if ( identifier.startsWith("file:/") ) {
  +            if ( identifier.startsWith("file:") ) {
                   this.resourceType = ResourceConnector.RESOURCE_TYPE_FILE;
  -                this.resourceIdentifier = identifier.substring("file:/".length());
  +                this.resourceIdentifier = identifier.substring("file:".length());
               } else {
                   this.resourceType = ResourceConnector.RESOURCE_TYPE_URI;
                   this.resourceIdentifier = identifier;
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org