浏览代码

* Patch from Bart Broersma to fix bug ID #33993

git-svn-id: trunk@39658 -
michael 7 年之前
父节点
当前提交
74b6fb2bfe
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. 2 0
      packages/fcl-registry/src/regini.inc
  2. 1 1
      packages/fcl-registry/src/xregreg.inc

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

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

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

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