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

* made forcedirectories consistent with other file handling
to accept both / and \ as spearators

git-svn-id: trunk@10104 -

peter 17 жил өмнө
parent
commit
3d319a99b8

+ 4 - 4
rtl/objpas/sysutils/sysutils.inc

@@ -40,7 +40,7 @@
             Result:=Temp;
             Result:=Temp;
             Temp:='';
             Temp:='';
           end;
           end;
-        If (Length(Result)>0) and (result[length(result)]<>DirectorySeparator) then
+        If (Length(Result)>0) and (result[length(result)] in AllowDirectorySeparators) then
           Result:=Result+DirectorySeparator;
           Result:=Result+DirectorySeparator;
         Result:=Result+name;
         Result:=Result+name;
         If not FileExists(Result) Then
         If not FileExists(Result) Then
@@ -551,7 +551,7 @@ begin
       E.ErrorCode:=3;
       E.ErrorCode:=3;
       Raise E;
       Raise E;
     end;
     end;
-  Result := DoForceDirectories(Dir);
+  Result := DoForceDirectories(SetDirSeparators(Dir));
 end;
 end;
 
 
 Procedure GetRandomBytes(Var Buf; NBytes : Integer);
 Procedure GetRandomBytes(Var Buf; NBytes : Integer);
@@ -632,7 +632,7 @@ begin
 {$ifdef MSWINDOWS}
 {$ifdef MSWINDOWS}
   SetLength(Result,MAX_PATH);
   SetLength(Result,MAX_PATH);
   SetLength(Result,GetModuleFileName(Module, Pchar(Result),Length(Result)));
   SetLength(Result,GetModuleFileName(Module, Pchar(Result),Length(Result)));
-{$ELSE}  
+{$ELSE}
   Result:='';
   Result:='';
-{$ENDIF}  
+{$ENDIF}
 end;
 end;