Author: rhuijben
Date: Fri Apr 26 08:08:41 2013
New Revision: 1476093

URL: http://svn.apache.org/r1476093
Log:
* subversion/libsvn_subr/subst.c
  (create_special_file_from_stream): Provide more diagnostics.
  (svn_subst_copy_and_translate4): Close temporary stream before returning.

Found by: Mark Irving <irving{_AT_}home.cam.net.uk>

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=1476093&r1=1476092&r2=1476093&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/subst.c (original)
+++ subversion/trunk/subversion/libsvn_subr/subst.c Fri Apr 26 08:08:41 2013
@@ -1701,7 +1701,7 @@ create_special_file_from_stream(svn_stre
                                 svn_io_file_del_none, pool));
 
   /* Do the atomic rename from our temporary location. */
-  return svn_io_file_rename(dst_tmp, dst, pool);
+  return svn_error_trace(svn_io_file_rename(dst_tmp, dst, pool));
 }
 
 
@@ -1749,8 +1749,9 @@ svn_subst_copy_and_translate4(const char
               SVN_ERR(svn_stream_open_readonly(&src_stream, src, pool, pool));
             }
 
-          return svn_error_trace(create_special_file_from_stream(src_stream,
-                                                                 dst, pool));
+          SVN_ERR(create_special_file_from_stream(src_stream, dst, pool));
+
+          return svn_error_trace(svn_stream_close(src_stream));
         }
       /* else !expand */
 


Reply via email to