[ 
https://issues.apache.org/jira/browse/JENA-418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13610071#comment-13610071
 ] 

Brian McBride commented on JENA-418:
------------------------------------

Andy - I noticed that about the patch.  I am unfamiliar with creating patch 
files.  I created this one in eclipse using team/create-patch.  I suspect its 
that way because I'm on windows and every line ending has changed so every line 
is affected.  Do let me know if there is a better way to do this.

When I test applying the patch it in eclipse, the Eclipse team/apply-path 
interface showed me the actual changes.  

The affected method (with change marked) is:

 public String toFileName(String filenameIRI)
    {
        // Do not use : it will ignore the directory. 
        //IRILib.filenameToIRI
        
        String scheme = FileUtils.getScheme(filenameIRI) ;
        String fn = filenameIRI ;
        // Windows : C:\\ is not a scheme name!
        if ( scheme != null) {
                if (scheme.length() > 1 )
            {
                    if ( ! scheme.equalsIgnoreCase("file") )
                        // Not filename or a file: IRI
                        return null ;
                fn = IRILib.IRIToFilename(filenameIRI) ;
//*************************** begin relevant change
            } else if (scheme.length() == 1) {
                // we have a windows drive letter on the front of fn
                // treat as absolute - even though it may be drive relative
                return fn;
//*************************** end relevant change
            }                
        }
        // fn is the file name to use.
        // If it is relative, and we have a different working directory, 
prepend that.  
        if ( thisDir != null && ! fn.startsWith("/") && ! 
fn.startsWith(File.separator) )
            fn = thisDir+File.separator+fn ;
        return fn ;
    }
                
> Test riot.stream.TestStreamManager.fm_open_10() fails on windows 8
> ------------------------------------------------------------------
>
>                 Key: JENA-418
>                 URL: https://issues.apache.org/jira/browse/JENA-418
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: ARQ
>         Environment: Windows 8
>            Reporter: Brian McBride
>            Priority: Minor
>         Attachments: org.apache.jena.riot.stream.LocatorFile.patch
>
>
> riot.stream.LocatorFile does not recognize a windows absolute pathname (e.g. 
> C:\foobar) as an absolute path.

--
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

Reply via email to