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:[EMAIL PROTECTED]";>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:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to