Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.5.3
-
None
-
None
Description
File#toURI produces an invalid URI on Windows:
file:/C:/path/to/basedir
A valid URI has to be:
file:///C:/path/to/basedir
Same issue for Unix-like OSes:
file:/path/to/basedir
A valid URI has to be:
file:///path/to/basedir
Using Path#toUri we can easily solve that problem because it creates compliant URIs. The failure occurs when interacting with local Git and Subversion repos:
PS D:\Entwicklung\Projekte\maven-scm> svn ls file:/D:/Entwicklung/svn-repos/scm-svn-test-at-sign svn: E020024: Error resolving case of 'file:\D:\Entwicklung\svn-repos\scm-svn-test-at-sign' while the proper (new) havior will produce a valid URI: PS D:\Entwicklung\Projekte\maven-scm> svn ls file:///D:/Entwicklung/svn-repos/scm-svn-test-at-sign branches/ tags/ trunk/
PS D:\Entwicklung\Projekte> git clone file:///D:/Entwicklung/git-repos/toll tlll2 Cloning into 'tlll2'... warning: You appear to have cloned an empty repository. PS D:\Entwicklung\Projekte> git clone file:/D:/Entwicklung/git-repos/toll tlll2 Cloning into 'tlll2'... ssh: Could not resolve hostname file: Name or service not known fatal: Could not read from remote repository.
or Subversion repo at: D:\Entwicklung\svn-repos\это по-русский:
PS D:\Entwicklung\Projekte> svn ls file:/D:/Entwicklung/svn-repos/это%20по-русский/ svn: E020024: Error resolving case of 'file:\D:\Entwicklung\svn-repos\???%20??-???????\'
proper URI gives:
PS D:\Entwicklung\Projekte> svn ls file:///D:/Entwicklung/svn-repos/%D1%8D%D1%82%D0%BE%20%D0%BF%D0%BE-%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9/ branches/ tags/ trunk/