Browse Source

* Start at root with setkey if key starts with / or \ (bug id 20761)

git-svn-id: trunk@26695 -
michael 11 years ago
parent
commit
628689e3e3
1 changed files with 2 additions and 0 deletions
  1. 2 0
      packages/fcl-registry/src/xmlreg.pp

+ 2 - 0
packages/fcl-registry/src/xmlreg.pp

@@ -163,6 +163,8 @@ begin
   Result:=(Length(KeyPath)>0);
   Result:=(Length(KeyPath)>0);
   If Not Result then
   If Not Result then
     Exit;
     Exit;
+  If (KeyPath[1] in ['/','\']) then
+    FCurrentElement:=Nil;
   KeyPath:=NormalizeKey(KeyPath);
   KeyPath:=NormalizeKey(KeyPath);
   If (FCurrentElement<>nil) then
   If (FCurrentElement<>nil) then
     begin
     begin