From c135faa8b30fd29a8b8e20cda6b07a882a042cbe Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Wed, 27 Jun 2001 17:38:40 +0000 Subject: * regtool.cc (find_key): Allow '/' as a synonym for '\\'. --- winsup/utils/regtool.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'winsup/utils/regtool.cc') diff --git a/winsup/utils/regtool.cc b/winsup/utils/regtool.cc index ef67bfc49..9ea9c14b5 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) -- cgit v1.2.3