subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmpil...@apache.org
Subject svn commit: r1066141 - /subversion/trunk/subversion/libsvn_subr/dirent_uri.c
Date Tue, 01 Feb 2011 19:10:24 GMT
Author: cmpilato
Date: Tue Feb  1 19:10:24 2011
New Revision: 1066141

URL: http://svn.apache.org/viewvc?rev=1066141&view=rev
Log:
* subversion/libsvn_subr/dirent_uri.c
  (svn_fspath__dirname): Handle the root fspath explicitly.

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=1066141&r1=1066140&r2=1066141&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/dirent_uri.c (original)
+++ subversion/trunk/subversion/libsvn_subr/dirent_uri.c Tue Feb  1 19:10:24 2011
@@ -2490,14 +2490,13 @@ const char *
 svn_fspath__dirname(const char *fspath,
                     apr_pool_t *pool)
 {
-  const char *result;
   assert(svn_fspath__is_canonical(fspath));
 
-  result = apr_pstrcat(pool, "/", svn_relpath_dirname(fspath + 1, pool),
+  if (fspath[0] == '/' && fspath[1] == '\0')
+    return apr_pstrdup(pool, fspath);
+  else
+    return apr_pstrcat(pool, "/", svn_relpath_dirname(fspath + 1, pool),
                        (char *)NULL);
-
-  assert(svn_fspath__is_canonical(result));
-  return result;
 }
 
 



Mime
View raw message