mono / ngit

Automated jgit port to c#
261 stars 151 forks source link

Sharpen.FilePath constructor and java.io.File behave differently #35

Open linquize opened 12 years ago

linquize commented 12 years ago

Current implementation of Sharpen.FilePath constructor and java.io.File behave differently. Especially in Windows. "C:", "\ABC\DEF" combines the wrong path

We may refer to the java test to match the behaviour http://hg.openjdk.java.net/build-infra/jdk7/jdk/raw-file/00cd9dc3c2b5/test/java/io/File/Cons.java

but we also need to consider backward slash "\" which is not covered by java test

alanmcgovern commented 12 years ago

I'll add this case to the testsuite and try to work up a fix. I'm not sure if I can look at that java file as it is probably licensed under the GPL or LGPL whereas MonoDevelop requires all code to be under MIT/X11 or Apache 2. The best way for me to fix issues with this code would be to submit testcases so I can re-implement the required behaviour.