Stefan Sperling wrote:
> On Tue, Jun 16, 2009 at 07:07:57PM +0200, Stefan Küng wrote:
>> [[[
>> Do not bail if the ALLUSERPROFILE folder does not exist.
>> * subversion/libsvn_subr/config.c
>> (get_category_config): handle the error gracefully.
>> ]]]
>> Index: subversion/libsvn_subr/config.c
>> ===================================================================
>> --- subversion/libsvn_subr/config.c (Revision 38046)
>> +++ subversion/libsvn_subr/config.c (Arbeitskopie)
>> @@ -198,6 +198,7 @@
>> {
>> const char *usr_reg_path = NULL, *sys_reg_path = NULL;
>> const char *usr_cfg_path, *sys_cfg_path;
>> + svn_error_t *error = NULL;
>
> Minor nitpick: We usually call errors just "err".
>
>> *cfg = NULL;
>>
>> @@ -210,7 +211,14 @@
>> category, NULL);
>> #endif /* WIN32 */
>>
>> - SVN_ERR(svn_config__sys_config_path(&sys_cfg_path, category, pool));
>> + error = svn_config__sys_config_path(&sys_cfg_path, category, pool);
>> + if ((error)&&(error->apr_err == SVN_ERR_BAD_FILENAME))
>
> We also usually put spaces around operators like &&.
>
> Looks good to me otherwise, though I can't test this because
> I don't run Windows.
>
> Stefan
Thanks for the review.
Corrected patch is attached.
Stefan
--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.net
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2362545
[[[
Do not bail if the ALLUSERPROFILE folder does not exist.
* subversion/libsvn_subr/config.c
(get_category_config): handle the error gracefully.
]]]
Index: subversion/libsvn_subr/config.c
===================================================================
--- subversion/libsvn_subr/config.c (Revision 38046)
+++ subversion/libsvn_subr/config.c (Arbeitskopie)
@@ -198,6 +198,7 @@
{
const char *usr_reg_path = NULL, *sys_reg_path = NULL;
const char *usr_cfg_path, *sys_cfg_path;
+ svn_error_t *err = NULL;
*cfg = NULL;
@@ -210,7 +211,14 @@
category, NULL);
#endif /* WIN32 */
- SVN_ERR(svn_config__sys_config_path(&sys_cfg_path, category, pool));
+ error = svn_config__sys_config_path(&sys_cfg_path, category, pool);
+ if ((err) && (err->apr_err == SVN_ERR_BAD_FILENAME))
+ {
+ sys_cfg_path = NULL;
+ svn_error_clear(err);
+ }
+ else
+ return err;
}
else
sys_cfg_path = NULL;
Received on 2009-06-16 20:06:20 CEST