Browse Source

* global appconfig dir needs to be common_appdata directory

git-svn-id: trunk@10068 -
peter 17 years ago
parent
commit
50a9dcd5f9
1 changed files with 7 additions and 19 deletions
  1. 7 19
      rtl/win/sysutils.pp

+ 7 - 19
rtl/win/sysutils.pp

@@ -1040,32 +1040,20 @@ Function GetAppConfigDir(Global : Boolean) : String;
 
 
 begin
 begin
   If Global then
   If Global then
-    Result:=DGetAppConfigDir(Global) // or use windows dir ??
+    Result:=GetSpecialDir(CSIDL_COMMON_APPDATA)+ApplicationName
   else
   else
-    begin
     Result:=GetSpecialDir(CSIDL_LOCAL_APPDATA)+ApplicationName;
     Result:=GetSpecialDir(CSIDL_LOCAL_APPDATA)+ApplicationName;
-    If (Result='') then
-      Result:=DGetAppConfigDir(Global);
-    end;
+  If (Result='') then
+    Result:=DGetAppConfigDir(Global);
 end;
 end;
 
 
 Function GetAppConfigFile(Global : Boolean; SubDir : Boolean) : String;
 Function GetAppConfigFile(Global : Boolean; SubDir : Boolean) : String;
 
 
 begin
 begin
-  if Global then
-    begin
-    Result:=IncludeTrailingPathDelimiter(DGetAppConfigDir(Global));
-    if SubDir then
-      Result:=IncludeTrailingPathDelimiter(Result+'Config');
-    Result:=Result+ApplicationName+ConfigExtension;
-    end
-  else
-    begin
-    Result:=IncludeTrailingPathDelimiter(GetAppConfigDir(False));
-    if SubDir then
-      Result:=Result+'Config\';
-    Result:=Result+ApplicationName+ConfigExtension;
-    end;
+  Result:=IncludeTrailingPathDelimiter(GetAppConfigDir(Global));
+  if SubDir then
+    Result:=IncludeTrailingPathDelimiter(Result+'Config');
+  Result:=Result+ApplicationName+ConfigExtension;
 end;
 end;
 
 
 Procedure InitSysConfigDir;
 Procedure InitSysConfigDir;