From 682bca235fc640470bfadbf75d93f10d0ccdeb77 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 8 Apr 2008 08:45:53 +0200 Subject: [PATCH] s-fileio.adb: Name_Error shouldn't be raised for a tempory file. 2008-04-08 Tristan Gingold * s-fileio.adb: Name_Error shouldn't be raised for a tempory file. From-SVN: r134012 --- gcc/ada/s-fileio.adb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/ada/s-fileio.adb b/gcc/ada/s-fileio.adb index 7a490cd..f34e68a 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; -- 2.7.4