You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2011/12/29 11:47:31 UTC
svn commit: r1225491 - /subversion/trunk/subversion/libsvn_subr/dirent_uri.c
Author: rhuijben
Date: Thu Dec 29 10:47:31 2011
New Revision: 1225491
URL: http://svn.apache.org/viewvc?rev=1225491&view=rev
Log:
Fix a stupid error in the path to url conversion code that isn't tested for
by our test suite, because svn_dirent_get_absolute fails for non existing
UNC paths.
* subversion/libsvn_subr/dirent_uri.c
(svn_uri_get_file_url_from_dirent): Fix the generation of urls from UNC
style paths on Windows.
Modified:
subversion/trunk/subversion/libsvn_subr/dirent_uri.c
Modified: subversion/trunk/subversion/libsvn_subr/dirent_uri.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/dirent_uri.c?rev=1225491&r1=1225490&r2=1225491&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/dirent_uri.c (original)
+++ subversion/trunk/subversion/libsvn_subr/dirent_uri.c Thu Dec 29 10:47:31 2011
@@ -2374,10 +2374,10 @@ svn_uri_get_file_url_from_dirent(const c
#else
if (dirent[0] == '/')
{
- /* Handle UNC paths */
- assert(dirent[1] != '/'); /* Not absolute! */
+ /* Handle UNC paths //server/share -> file://server/share */
+ assert(dirent[1] == '/'); /* Expect UNC, not non-absolute */
- *url = apr_pstrcat(pool, "file://", dirent+1, NULL);
+ *url = apr_pstrcat(pool, "file:", dirent, NULL);
}
else
*url = apr_pstrcat(pool, "file:///", dirent, NULL);