You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2018/07/19 23:10:51 UTC
svn commit: r1836306 - /subversion/trunk/subversion/libsvn_subr/io.c
Author: philip
Date: Thu Jul 19 23:10:51 2018
New Revision: 1836306
URL: http://svn.apache.org/viewvc?rev=1836306&view=rev
Log:
* subversion/libsvn_subr/io.c
(stringbuf_from_aprfile): If the file is a FIFO then do not rely on
the filesize as it will always be zero. This allows things like:
svn commit -F <(echo foo)
svnmucc propsetf p <(echo bar) URL
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=1836306&r1=1836305&r2=1836306&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/io.c (original)
+++ subversion/trunk/subversion/libsvn_subr/io.c Thu Jul 19 23:10:51 2018
@@ -2546,9 +2546,10 @@ stringbuf_from_aprfile(svn_stringbuf_t *
{
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, file) && finfo.fname)
+ /* 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) and for FIFOs */
+ if (! apr_file_info_get(&finfo, APR_FINFO_SIZE | APR_FINFO_TYPE, file)
+ && finfo.fname && finfo.filetype != APR_PIPE)
{
/* we've got the file length. Now, read it in one go. */
svn_boolean_t eof;