diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-04-08 06:45:53 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-04-08 06:45:53 +0000 |
commit | 7edd823de73e3ff95b79ec5f21f34d90a1362c8b (patch) | |
tree | 80e40eb49bda3312d84a0e49ed63da5e8125b936 /gcc/ada/s-fileio.adb | |
parent | 3a2db8abb826ba557346f732bd7604511002a208 (diff) | |
download | gcc-7edd823de73e3ff95b79ec5f21f34d90a1362c8b.tar.gz |
2008-04-08 Tristan Gingold <gingold@adacore.com>
* s-fileio.adb: Name_Error shouldn't be raised for a tempory file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134012 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-fileio.adb')
-rw-r--r-- | gcc/ada/s-fileio.adb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/ada/s-fileio.adb b/gcc/ada/s-fileio.adb index 7a490cdc15c..f34e68ab696 100644 --- a/gcc/ada/s-fileio.adb +++ b/gcc/ada/s-fileio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2007, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2008, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -823,7 +823,7 @@ package body System.File_IO is if Stream /= NULL_Stream then Full_Name_Len := Name'Length + 1; Fullname (1 .. Full_Name_Len - 1) := Name; - Fullname (Full_Name_Len) := ASCII.Nul; + Fullname (Full_Name_Len) := ASCII.NUL; -- Normal case of Open or Create @@ -982,7 +982,7 @@ package body System.File_IO is Stream := fopen (Namestr'Address, Fopstr'Address, Encoding); if Stream = NULL_Stream then - if file_exists (Namestr'Address) = 0 then + if not Tempfile and then file_exists (Namestr'Address) = 0 then raise Name_Error; else raise Use_Error; |