[Patch] regtool - Handle keys with only one subkey

Chris Genly chgenly@yahoo.com
Sat Jul 14 11:08:00 GMT 2001


I was writing a small installer script using bash and regtool.  I ran in to a bug in regtool which
prevented it from creating top level keys.  Below is the change log and unified diff patch.  I do
not subscribe to this list, so send email directly if you wish to talk to me about the change.

cygwin is amazing.  I'm glad to make a tiny contribution.


2001-07-14    Chris Genly   <chgenly@alum.mit.edu>

* regtool.cc (find_key): Handle keys with only one subkey.  For example /root/.roapi

--- regtool.cc.orig	Mon Jan 29 18:36:18 2001
+++ regtool.cc	Fri Jul 13 20:59:46 2001
@@ -221,11 +221,15 @@ find_key (int howmanyparts, REGSAM acces
 	e--;
       if (*e != '\\')
 	{
-	  fprintf (stderr, "Invalid key\n");
-	  exit (1);
+          key = wkprefixes[i].key;
+	  value = n;
+          return;
+	}
+      else
+        {
+          *e = 0;
+          value = e + 1;
 	}
-      *e = 0;
-      value = e + 1;
     }
   if (n[0] == 0)
     {


=====
--------------------------------------------------------
Chris Genly
Email: chgenly@alum.mit.edu
Speech, Distributed Objects and Renewable energy for all.

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list