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

Re: svn commit: r1328939 - /subversion/trunk/subversion/libsvn_subr/io.c

From: Stefan Fuhrmann <eqfox_at_web.de>
Date: Sat, 28 Apr 2012 15:26:11 +0200

Bert Huijben wrote:
>
>> -----Original Message-----
>> From: stefan2_at_apache.org [mailto:stefan2_at_apache.org]
>> Sent: zondag 22 april 2012 21:15
>> To: commits_at_subversion.apache.org
>> Subject: svn commit: r1328939 - /subversion/trunk/subversion/libsvn_subr/io.c
>>
>> Author: stefan2
>> Date: Sun Apr 22 19:14:50 2012
>> New Revision: 1328939
>>
>> URL: http://svn.apache.org/viewvc?rev=1328939&view=rev
>> Log:
>> * subversion/libsvn_subr/io.c
>> (svn_io_lock_open_file, svn_io_unlock_open_file): fix handling of APR errors
>>
>> Found by: rhuijben
>>
>> 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
>> =1328939&r1=1328938&r2=1328939&view=diff
>> =================================================================
>> =============
>> --- subversion/trunk/subversion/libsvn_subr/io.c (original)
>> +++ subversion/trunk/subversion/libsvn_subr/io.c Sun Apr 22 19:14:50 2012
>> @@ -1883,6 +1883,8 @@ svn_io_lock_open_file(apr_file_t *lockfi
>> /* We need this only in case of an error but this is cheap to get -
>> * so we do it here for clarity. */
>> apr_err = apr_file_name_get(&fname, lockfile_handle);
>> + if (apr_err)
>> + return svn_error_wrap_apr(apr_err, _("Can't get file name"));
>>
>> /* Get lock on the filehandle. */
>> apr_err = apr_file_lock(lockfile_handle, locktype);
>> @@ -1909,11 +1911,11 @@ svn_io_lock_open_file(apr_file_t *lockfi
>> case APR_FLOCK_SHARED:
>> return svn_error_wrap_apr(apr_err,
>> _("Can't get shared lock on file '%s'"),
>> - svn_dirent_local_style(fname, pool));
>> + fname);
> fname is not guaranteed to be utf-8 here on many platforms. (It is on Windows and OS/X). Before passing it to svn_dirent_local style it must be converted to utf-8 with something like cstring_to_utf8().

r1331761 now uses svn_dirent_local_style consistently
throughout svn_io.c. r1331782 then addresses the
UTF-8 issue.

-- Stefan^2.
Received on 2012-04-28 17:26:45 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.