Răsfoiți Sursa

Merged revisions 11384,11529 via svnmerge from
http://svn.freepascal.org/svn/fpc/trunk

........
r11384 | joost | 2008-07-15 15:12:42 +0200 (Ut, 15 júl 2008) | 1 line

* Add path-delimiters properly in GetAppConfigDir and GetAppConfigFile
........
r11529 | Almindor | 2008-08-07 12:22:30 +0200 (Št, 07 aug 2008) | 2 lines

* fix GetAppConfigDir and GetTmpDir for Windows(R)(c)(TM) and WinCE, unify with unix and provide pathdelim at end

........

git-svn-id: branches/fixes_2_2@11535 -

Almindor 17 ani în urmă
părinte
comite
984f2a50e8
3 a modificat fișierele cu 9 adăugiri și 8 ștergeri
  1. 4 4
      rtl/unix/sysutils.pp
  2. 2 2
      rtl/win/sysutils.pp
  3. 3 2
      rtl/wince/sysutils.pp

+ 4 - 4
rtl/unix/sysutils.pp

@@ -1008,9 +1008,9 @@ Function GetAppConfigDir(Global : Boolean) : String;
 
 begin
   If Global then
-    Result:=SysConfigDir
+    Result:=IncludeTrailingPathDelimiter(SysConfigDir)
   else
-    Result:=XdgConfigHome;
+    Result:=IncludeTrailingPathDelimiter(XdgConfigHome);
   if VendorName<>'' then
     Result:=IncludeTrailingPathDelimiter(Result+VendorName);
   Result:=IncludeTrailingPathDelimiter(Result+ApplicationName);
@@ -1020,9 +1020,9 @@ Function GetAppConfigFile(Global : Boolean; SubDir : Boolean) : String;
 
 begin
   If Global then
-    Result:=SysConfigDir
+    Result:=IncludeTrailingPathDelimiter(SysConfigDir)
   else
-    Result:=XdgConfigHome;
+    Result:=IncludeTrailingPathDelimiter(XdgConfigHome);
   if SubDir then
     begin
       if VendorName<>'' then

+ 2 - 2
rtl/win/sysutils.pp

@@ -1050,10 +1050,10 @@ begin
     begin
       if VendorName<>'' then
         Result:=IncludeTrailingPathDelimiter(Result+VendorName);
-      Result:=Result+ApplicationName;
+      Result:=IncludeTrailingPathDelimiter(Result+ApplicationName);
     end
   else
-    Result:=DGetAppConfigDir(Global);
+    Result:=IncludeTrailingPathDelimiter(DGetAppConfigDir(Global));
 end;
 
 Function GetAppConfigFile(Global : Boolean; SubDir : Boolean) : String;

+ 3 - 2
rtl/wince/sysutils.pp

@@ -749,10 +749,10 @@ begin
     begin
       if VendorName<>'' then
         Result:=IncludeTrailingPathDelimiter(Result+VendorName);
-      Result:=Result+ApplicationName;
+      Result:=IncludeTrailingPathDelimiter(Result+ApplicationName);
     end
   else
-    Result:=DGetAppConfigDir(Global);
+    Result:=IncludeTrailingPathDelimiter(DGetAppConfigDir(Global));
 end;
 
 Function GetAppConfigFile(Global : Boolean; SubDir : Boolean) : String;
@@ -768,6 +768,7 @@ begin
   SetLength(buf, MAX_PATH);
   SetLength(buf, GetTempPath(Length(buf) + 1, PWideChar(buf)));
   Result:=buf;
+  Result := IncludeTrailingPathDelimiter(Result);
 end;
 
 {****************************************************************************