subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kot...@apache.org
Subject svn commit: r1758988 - /subversion/trunk/subversion/libsvn_subr/subst.c
Date Fri, 02 Sep 2016 16:34:15 GMT
Author: kotkov
Date: Fri Sep  2 16:34:15 2016
New Revision: 1758988

URL: http://svn.apache.org/viewvc?rev=1758988&view=rev
Log:
In svn_subst_stream_translated(), don't advertise mark/seek capabilities
for the result if the inner stream doesn't support them, as promised in
the API documentation.

* subversion/libsvn_subr/subst.c
  (stream_translated): Install mark and seek handlers only if the underlying
   stream supports them.

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

Modified: subversion/trunk/subversion/libsvn_subr/subst.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/subst.c?rev=1758988&r1=1758987&r2=1758988&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/subst.c (original)
+++ subversion/trunk/subversion/libsvn_subr/subst.c Fri Sep  2 16:34:15 2016
@@ -1538,8 +1538,11 @@ stream_translated(svn_stream_t *stream,
                        translated_stream_read);
   svn_stream_set_write(s, translated_stream_write);
   svn_stream_set_close(s, translated_stream_close);
-  svn_stream_set_mark(s, translated_stream_mark);
-  svn_stream_set_seek(s, translated_stream_seek);
+  if (svn_stream_supports_mark(stream))
+    {
+      svn_stream_set_mark(s, translated_stream_mark);
+      svn_stream_set_seek(s, translated_stream_seek);
+    }
 
   return s;
 }



Mime
View raw message