You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/11/23 01:03:54 UTC

svn commit: r1544715 - /subversion/trunk/subversion/libsvn_subr/io.c

Author: stefan2
Date: Sat Nov 23 00:03:54 2013
New Revision: 1544715

URL: http://svn.apache.org/r1544715
Log:
Make the stringbuf_from_aprfile() quickpath actually kick in.

* subversion/libsvn_subr/io.c
  (stringbuf_from_aprfile): APR does not set the name but the fname field

Modified:
    subversion/trunk/subversion/libsvn_subr/io.c

Modified: subversion/trunk/subversion/libsvn_subr/io.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/io.c?rev=1544715&r1=1544714&r2=1544715&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/io.c (original)
+++ subversion/trunk/subversion/libsvn_subr/io.c Sat Nov 23 00:03:54 2013
@@ -2307,12 +2307,11 @@ stringbuf_from_aprfile(svn_stringbuf_t *
      efficient memory handling, we'll try to do so. */
   if (check_size)
     {
-      apr_finfo_t finfo;
+      apr_finfo_t finfo = { 0 };
 
       /* In some cases we get size 0 and no error for non files,
           so we also check for the name. (= cached in apr_file_t) */
-      if (! apr_file_info_get(&finfo, APR_FINFO_SIZE | APR_FINFO_NAME, file)
-          && finfo.name != NULL)
+      if (! apr_file_info_get(&finfo, APR_FINFO_SIZE, file) && finfo.fname)
         {
           /* we've got the file length. Now, read it in one go. */
           svn_boolean_t eof;