Ok, reviewed apr’s usage of these two variables.
Using fname is the better case on all platforms. name is only set on the CP/M based platforms, not on the posix platforms. Bert From: Bert Huijben [mailto:b...@qqmail.nl] Sent: zaterdag 23 november 2013 13:00 To: dev@subversion.apache.org; comm...@subversion.apache.org Subject: RE: svn commit: r1544715 - /subversion/trunk/subversion/libsvn_subr/io.c 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 _____ From: stef...@apache.org <mailto:stef...@apache.org> Sent: 23-11-2013 01:04 To: comm...@subversion.apache.org <mailto:comm...@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 <http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/io.c?rev=1544715&r1=1544714&r2=1544715&view=diff> &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;