Commit 5c1ba4cc by Pascal Obry Committed by Geert Bosch

g-dirope.adb (Basename): correctly compute offset between the original Path and the translated one.

	* g-dirope.adb (Basename): correctly compute offset between the
        original Path and the translated one.

	* g-dirope.adb: (Base_Name): add some comments.

From-SVN: r46502
parent a7fb206d
2001-10-25 Pascal Obry <obry@gnat.com>
* g-dirope.adb (Basename): correctly compute offset between the
original Path and the translated one.
* g-dirope.adb: (Base_Name): add some comments.
2001-10-25 Robert Dewar <dewar@gnat.com> 2001-10-25 Robert Dewar <dewar@gnat.com>
* exp_imgv.adb (Expand_Image_Attribute): Defend against bad use * exp_imgv.adb (Expand_Image_Attribute): Defend against bad use
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- $Revision: 1.15 $ -- $Revision$
-- -- -- --
-- Copyright (C) 1998-2001 Ada Core Technologies, Inc. -- -- Copyright (C) 1998-2001 Ada Core Technologies, Inc. --
-- -- -- --
...@@ -122,7 +122,10 @@ package body GNAT.Directory_Operations is ...@@ -122,7 +122,10 @@ package body GNAT.Directory_Operations is
end if; end if;
Check_For_Standard_Dirs : declare 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 begin
if BN = "." or else BN = ".." then if BN = "." or else BN = ".." then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment