diff options
author | bosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-25 23:12:24 +0000 |
---|---|---|
committer | bosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-25 23:12:24 +0000 |
commit | eb1a998c606d4712d88fa768ad5f0d09d956b749 (patch) | |
tree | e9b8cd80e50fa3121519ea2b6a71175674e98016 /gcc/ada/g-dirope.adb | |
parent | 629ca7e22bfcef094a567e6922551226ceea2aa6 (diff) | |
download | linaro-gcc-eb1a998c606d4712d88fa768ad5f0d09d956b749.tar.gz linaro-gcc-eb1a998c606d4712d88fa768ad5f0d09d956b749.tar.bz2 linaro-gcc-eb1a998c606d4712d88fa768ad5f0d09d956b749.zip |
* g-dirope.adb (Basename): correctly compute offset between the
original Path and the translated one.
* g-dirope.adb: (Base_Name): add some comments.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46502 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/g-dirope.adb')
-rw-r--r-- | gcc/ada/g-dirope.adb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/ada/g-dirope.adb b/gcc/ada/g-dirope.adb index d73d9a02005..afa996c56b2 100644 --- a/gcc/ada/g-dirope.adb +++ b/gcc/ada/g-dirope.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- $Revision: 1.15 $ +-- $Revision$ -- -- -- Copyright (C) 1998-2001 Ada Core Technologies, Inc. -- -- -- @@ -122,7 +122,10 @@ package body GNAT.Directory_Operations is end if; Check_For_Standard_Dirs : declare - BN : constant String := Base_Name.Path (Cut_Start .. Cut_End); + Offset : constant Integer := Path'First - Base_Name.Path'First; + BN : constant String := + Base_Name.Path (Cut_Start - Offset .. Cut_End - Offset); + -- Here we use Base_Name.Path to keep the original casing begin if BN = "." or else BN = ".." then |