OSDN Git Service

2007-12-06 Vincent Celier <celier@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 13 Dec 2007 10:41:38 +0000 (10:41 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 13 Dec 2007 10:41:38 +0000 (10:41 +0000)
* a-direct.adb (Create_Path): Always take '/' as a directory separator,
even on Windows

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130871 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/a-direct.adb

index 52ad1b3..5c5c784 100644 (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