[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

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

From: Bert Huijben <bert_at_qqmail.nl>
Date: Sat, 23 Nov 2013 12:59:56 +0100

Strange I debugged this on Windows and I'm sure it worked there. On which platform was it broken and does it still work on Windows?

Bert

-----Original Message-----
From: "stefan2_at_apache.org" <stefan2_at_apache.org>
Sent: ‎23-‎11-‎2013 01:04
To: "commits_at_subversion.apache.org" <commits_at_subversion.apache.org>
Subject: 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;
Received on 2013-11-23 13:02:24 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.