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

patch: don't bail when ALLUSERPROFILE is missing

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Tue, 16 Jun 2009 19:07:57 +0200

Hi,

On the TSVN list, a user complained that Subversion doesn't work if the
ALLUSERSPROFILE folder is missing. Seems that such a setup is common for
cytrix setups.

The attached patch fixes this issue: if the ALLUSERSPROFILE folder is
missing, the config data is only read from the APPDATA folder (the users
config folder).

The patch also applies cleanly to 1.6.x, so I would recommend to have
this backported too.

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=2362534

[[[
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;
 
   *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))
+ {
+ sys_cfg_path = NULL;
+ svn_error_clear(error);
+ }
+ else
+ return error;
     }
   else
     sys_cfg_path = NULL;

Received on 2009-06-16 19:08:19 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.