On 28.04.2015 17:03, Ivan Zhakov wrote: > On 28 April 2015 at 17:56, Branko Čibej <br...@wandisco.com> wrote: >> On 28.04.2015 15:45, i...@apache.org wrote: >>> Author: ivan >>> Date: Tue Apr 28 13:45:42 2015 >>> New Revision: 1676535 >>> >>> URL: http://svn.apache.org/r1676535 >>> Log: >>> Follow-up to r1676526: Close install_stream in test. >>> >>> * subversion/tests/libsvn_subr/io-test.c >>> (test_install_stream_to_longpath): Close stream before calling >>> svn_stream__install_stream(). >>> >>> Modified: >>> subversion/trunk/subversion/tests/libsvn_subr/io-test.c >>> >>> Modified: subversion/trunk/subversion/tests/libsvn_subr/io-test.c >>> URL: >>> http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_subr/io-test.c?rev=1676535&r1=1676534&r2=1676535&view=diff >>> ============================================================================== >>> --- subversion/trunk/subversion/tests/libsvn_subr/io-test.c (original) >>> +++ subversion/trunk/subversion/tests/libsvn_subr/io-test.c Tue Apr 28 >>> 13:45:42 2015 >>> @@ -768,6 +768,7 @@ test_install_stream_to_longpath(apr_pool >>> final_abspath = svn_dirent_join(deep_dir, "stream1", pool); >>> SVN_ERR(svn_stream__create_for_install(&stream, deep_dir, pool, pool)); >>> SVN_ERR(svn_stream_puts(stream, "stream1 content")); >>> + SVN_ERR(svn_stream_close(stream)); >>> SVN_ERR(svn_stream__install_stream(stream, >>> final_abspath, >>> TRUE, >> >> Um, surely that can't be right? Using the stream after it's been closed? >> > I'm also find this behavior a little bit confusing, but this is how it > works now: install_stream should be closed before installing. Windows > implementation perform flush on close, while unix implementation > closes the file handle. The current callers (run_file_install in > workqueue.c:587) also closes install_stream before installing it.
Ah, I see it now ... "install streams" are special, they store the file name in the stream baton. -- Brane