a-direct.adb (Create_Path): Always take '/' as a directory separator, even on Windows

2007-12-06  Vincent Celier  <celier@adacore.com>

	* a-direct.adb (Create_Path): Always take '/' as a directory separator,
	even on Windows

From-SVN: r130871
This commit is contained in:
Vincent Celier 2007-12-13 11:41:38 +01:00 committed by Arnaud Charlet
parent 34a343e634
commit b1c6645b93
1 changed files with 6 additions and 2 deletions

View File

@ -390,13 +390,17 @@ package body Ada.Directories is
-- Look for the end of an intermediate directory
if New_Dir (J) /= Dir_Separator then
if New_Dir (J) /= Dir_Separator and then
New_Dir (J) /= '/'
then
Last := J;
-- We have found a new intermediate directory each time we find
-- a first directory separator.
elsif New_Dir (J - 1) /= Dir_Separator then
elsif New_Dir (J - 1) /= Dir_Separator and then
New_Dir (J - 1) /= '/'
then
-- No need to create the directory if it already exists