2
0
Эх сурвалжийг харах

* Patch from Bart Broersma to fix bug ID #33993

git-svn-id: trunk@39658 -
michael 7 жил өмнө
parent
commit
74b6fb2bfe

+ 2 - 0
packages/fcl-registry/src/regini.inc

@@ -14,6 +14,8 @@ begin
   fFileName := FN;
   fFileName := FN;
   if fFileName<>'' then begin
   if fFileName<>'' then begin
     fPath := fFileName + '\';
     fPath := fFileName + '\';
+    if fPath[1]='\' then
+      System.Delete(fPath,1,1);
     OpenKey(fFileName, aaccess <> KEY_READ);
     OpenKey(fFileName, aaccess <> KEY_READ);
   end
   end
   else
   else

+ 1 - 1
packages/fcl-registry/src/xregreg.inc

@@ -183,7 +183,7 @@ end;
 
 
 function TRegistry.GetKey(const Key: string): HKEY;
 function TRegistry.GetKey(const Key: string): HKEY;
 begin
 begin
-  Result := 0;
+  Result := FCurrentKey;
 end;
 end;
 
 
 function TRegistry.GetKeyInfo(Out Value: TRegKeyInfo): Boolean;
 function TRegistry.GetKeyInfo(Out Value: TRegKeyInfo): Boolean;