Browse Source

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

git-svn-id: trunk@11529 -
Almindor 17 years ago
parent
commit
4a54f15b47
2 changed files with 5 additions and 4 deletions
  1. 2 2
      rtl/win/sysutils.pp
  2. 3 2
      rtl/wince/sysutils.pp

+ 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;
 
 {****************************************************************************