[ 
https://issues.apache.org/jira/browse/IVY-908?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andy Seaborne updated IVY-908:
------------------------------


On windows "\" and "/" are acceptable separators: hence documentation saying 
"/path/to" is confusing:

Test:: this is without Cygwin:

Absolute: /foo/bar==>false
Parent: /foo/bar==>\foo

Absolute: \foo\bar==>false
Parent: \foo\bar==>\foo

Absolute: c:/foo/bar==>true
Parent: c:/foo/bar==>c:\foo     # Shows / is a separator.

Absolute: c:\foo\bar==>true
Parent: c:\foo\bar==>c:\foo

from::

 static void test(String x)
    {
        System.out.println("Absolute: "+x+"==>"+new File(x).isAbsolute()) ;
        System.out.println("Parent: "+x+"==>"+new File(x).getParent()) ;
        System.out.println() ;
    }
    
    public static void main(String ... args) throws IOException
    {
        test("/foo/bar") ;
        test("\\foo\\bar") ;
        test("c:/foo/bar") ;
        test("c:\\foo\\bar") ;
        System.exit(0) ;
  }

> UNIX-style filenames for paths to work on MS-Windows
> ----------------------------------------------------
>
>                 Key: IVY-908
>                 URL: https://issues.apache.org/jira/browse/IVY-908
>             Project: Ivy
>          Issue Type: Improvement
>    Affects Versions: 2.0-RC1
>         Environment: cywgin on MS Wondows.
>            Reporter: Andy Seaborne
>            Priority: Minor
>
> A file name /path/to/repository is not absolute on MS-Windows.  A drive 
> letter is needed.
> This is particularly confusing if using cygwin but is true when using Windows 
> without cygwin ("/" is an acceptable path separator).
> Leads to less portability between Linux and Windows.
> In 2.0-RC-1, more paths must be absolute (e.g filesystem resolver artifact 
> pattern, keyfile to sftp resolver).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to