aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Celier <celier@adacore.com>2007-12-13 11:41:38 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2007-12-13 11:41:38 +0100
commitb1c6645b93c2cc50b6b161911a7936ed50b26fe4 (patch)
tree6aa19a7fc25aed7d2f81e311c26c10f6933c11b1
parent34a343e634c7b155a8553e45ffabd3f24f0765ec (diff)
downloadgcc-b1c6645b93c2cc50b6b161911a7936ed50b26fe4.zip
gcc-b1c6645b93c2cc50b6b161911a7936ed50b26fe4.tar.gz
gcc-b1c6645b93c2cc50b6b161911a7936ed50b26fe4.tar.bz2
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
-rw-r--r--gcc/ada/a-direct.adb8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/ada/a-direct.adb b/gcc/ada/a-direct.adb
index 52ad1b3..5c5c784 100644
--- a/gcc/ada/a-direct.adb
+++ b/gcc/ada/a-direct.adb
@@ -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