subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1354876 - /subversion/trunk/subversion/libsvn_subr/dirent_uri.c
Date Thu, 28 Jun 2012 09:16:42 GMT
Author: stsp
Date: Thu Jun 28 09:16:41 2012
New Revision: 1354876

URL: http://svn.apache.org/viewvc?rev=1354876&view=rev
Log:
* subversion/libsvn_subr/dirent_uri.c
  (svn_dirent_get_absolute): If the provided input is already absolute, just
   return a copy of the input instead of asking APR to figure out the absolute
   path. This should allow Subversion to run within a directory which has been
   removed, as long the user passes absolute paths.
   See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=678845

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=1354876&r1=1354875&r2=1354876&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/dirent_uri.c (original)
+++ subversion/trunk/subversion/libsvn_subr/dirent_uri.c Thu Jun 28 09:16:41 2012
@@ -1554,6 +1554,13 @@ svn_dirent_get_absolute(const char **pab
 
   SVN_ERR_ASSERT(! svn_path_is_url(relative));
 
+  /* If the input is already absolute, just copy it to the result pool. */
+  if (svn_dirent_is_absolute(relative))
+    {
+      *pabsolute = apr_pstrdup(pool, relative);
+      return SVN_NO_ERROR;
+    }
+
   /* Merge the current working directory with the relative dirent. */
   SVN_ERR(svn_path_cstring_from_utf8(&path_apr, relative, pool));
 



Mime
View raw message