From 3d319a99b871be756b37f1920240ec49e071fb19 Mon Sep 17 00:00:00 2001 From: peter Date: Tue, 29 Jan 2008 22:14:53 +0000 Subject: [PATCH] * made forcedirectories consistent with other file handling to accept both / and \ as spearators git-svn-id: trunk@10104 - --- rtl/objpas/sysutils/sysutils.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rtl/objpas/sysutils/sysutils.inc b/rtl/objpas/sysutils/sysutils.inc index 951ecff524..2e3a72bda3 100644 --- a/rtl/objpas/sysutils/sysutils.inc +++ b/rtl/objpas/sysutils/sysutils.inc @@ -40,7 +40,7 @@ Result:=Temp; Temp:=''; 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+name; If not FileExists(Result) Then @@ -551,7 +551,7 @@ begin E.ErrorCode:=3; Raise E; end; - Result := DoForceDirectories(Dir); + Result := DoForceDirectories(SetDirSeparators(Dir)); end; Procedure GetRandomBytes(Var Buf; NBytes : Integer); @@ -632,7 +632,7 @@ begin {$ifdef MSWINDOWS} SetLength(Result,MAX_PATH); SetLength(Result,GetModuleFileName(Module, Pchar(Result),Length(Result))); -{$ELSE} +{$ELSE} Result:=''; -{$ENDIF} +{$ENDIF} end;