From b7377b5b41a031a0d90890b9cc85586c91b13552 Mon Sep 17 00:00:00 2001 From: cgf Date: Wed, 27 Jun 2001 17:38:40 +0000 Subject: [PATCH] * regtool.cc (find_key): Allow '/' as a synonym for '\\'. --- winsup/utils/ChangeLog | 4 ++++ winsup/utils/regtool.cc | 9 ++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index e7c95add5f..76ff4d4e6f 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,7 @@ +Wed Jun 27 13:37:41 2001 Keith Starsmeare" + + * regtool.cc (find_key): Allow '/' as a synonym for '\\'. + Fri Jun 15 00:49:21 2001 Christopher Faylor * mkpasswd.c (main): Output passwd file in binary mode so that there diff --git a/winsup/utils/regtool.cc b/winsup/utils/regtool.cc index ef67bfc491..9ea9c14b50 100644 --- a/winsup/utils/regtool.cc +++ b/winsup/utils/regtool.cc @@ -194,10 +194,13 @@ find_key (int howmanyparts, REGSAM access) int i; if (*n == '/') translate (n); - while (*n == '\\') + while ((*n == '\\') || (*n == '/')) n++; - for (e = n; *e && *e != '\\'; e++); - c = *e; + for (e = n; *e && *e != '\\' && *e != '/'; e++); + if (*e == '/') + c = '\\'; + else + c = *e; *e = 0; for (i = 0; wkprefixes[i].string; i++) if (strcmp (wkprefixes[i].string, n) == 0) -- 2.11.0