From 5d69ba2cd895cb74fb6a13bbe3ea23f3c29e781a Mon Sep 17 00:00:00 2001 From: yury Date: Tue, 19 Jan 2021 17:30:11 +0000 Subject: [PATCH] * TXmlRegistry: When a key name starts with \ or / it means the absolute path to the key is specified. So ignore the currently selected key when an absolute key is requested. git-svn-id: trunk@48209 - --- packages/fcl-registry/src/xmlreg.pp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/fcl-registry/src/xmlreg.pp b/packages/fcl-registry/src/xmlreg.pp index 37a36656a3..961c599878 100644 --- a/packages/fcl-registry/src/xmlreg.pp +++ b/packages/fcl-registry/src/xmlreg.pp @@ -259,6 +259,8 @@ begin Result:=(Length(KeyPath)>0); If Not Result then Exit; + If (KeyPath[1] in ['/','\']) then + FCurrentElement:=Nil; KeyPath:=NormalizeKey(KeyPath); If (FCurrentElement<>nil) then begin @@ -907,6 +909,8 @@ begin Result:=Nil; If (Length(S)=0) then Exit; + if S[1] in ['/','\'] then + FCurrentElement:=nil; S:=NormalizeKey(S); If (FCurrentElement<>nil) then begin