Spurious URL syntax error: "Win32 file urls start with file:///x:/ where x is a valid drive letter"

Bug #57869 reported by Misha Dorman
2
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Low
Alexander Belchenko

Bug Description

Affects: bzr 0.9, Win32 native.

Attempting to use a UNC path (//servername/share/path/.../, or for that matter the \\...\ equivalent) in bzr 0.9 on Win32 fails, because _win32_local_path_from_url() is overly-picky about the possible forms of Win32 file:/// URL syntax.

A workaround is to map a drive to the UNC path, but that is far from ideal (UNC paths may not be perfect, but they at least get around the 26-letter drive letter limitation and reduce the scope for collisions).

This bug doesn't seem to affect the cygwin version (presumably it uses the _posix_ versions of the local_path functions, which (accidentally?) allow the //servername/path/.../ syntax.

The fix will also need to change _win32_local_path_to_url() and WIN32_MIN_ABS_FILEURL_LENGTH, which also rely on the "starts with drive letter" assumption.

Revision history for this message
John A Meinel (jameinel) wrote :

this is a bug, and patches are welcome. Probably the best thing is to use: 'file://host/path' rather than using 'file://///host/path'.

Changed in bzr:
importance: Undecided → Low
status: Unconfirmed → Confirmed
Changed in bzr:
assignee: nobody → bialix
status: Confirmed → Fix Committed
Aaron Bentley (abentley)
Changed in bzr:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.