[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r33831 - trunk/subversion/libsvn_wc

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: Wed, 22 Oct 2008 09:15:58 -0500

Greg Stein wrote:
> On Tue, Oct 21, 2008 at 7:18 PM, <hwright_at_tigris.org> wrote:
>> ...
>> +++ trunk/subversion/libsvn_wc/props.c Tue Oct 21 19:18:36 2008 (r33831)
>> @@ -1318,18 +1318,14 @@ maybe_generate_propconflict(svn_boolean_
>>
>> if (working_val && new_val)
>> {
>> - apr_file_t *merged_file;
>> svn_stream_t *mergestream;
>> svn_diff_t *diff;
>> svn_diff_file_options_t *options =
>> svn_diff_file_options_create(filepool);
>>
>> - SVN_ERR(svn_io_open_unique_file2(&merged_file, &cdesc->merged_file,
>> - path, ".tmp",
>> - svn_io_file_del_on_pool_cleanup,
>> - filepool));
>> - mergestream = svn_stream_from_aprfile2(merged_file, FALSE,
>> - filepool);
>> + SVN_ERR(svn_stream_open_unique(&mergestream, &cdesc->merged_file,
>> + path, svn_io_file_del_on_pool_cleanup,
>> + filepool, pool));
>
> Woah. You sure that PATH is a directory? Otherwise, the above code
> isn't going to work.
>
> svn_stream_open_unique() takes a directory path and creates a child in
> that directory. svn_io_open_unique_file2() takes a file path, and
> creates a sibling.

Nice catch. Using our newly-enhanced svn_stream_open_unique(), I think this is
a valid place to pass NULL for the dirpath, and let the OS worry about where the
temporary file lives.

-Hyrum

Received on 2008-10-22 16:16:16 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.