From 1c9e0120eb6386e36415a0e3c9f6d962f09879a2 Mon Sep 17 00:00:00 2001 From: Vincent Celier Date: Tue, 15 Nov 2005 15:05:07 +0100 Subject: [PATCH] tempdir.adb (Tempdir): Do not use environment variable TMPDIR if it designates a non existent directory. 2005-11-14 Vincent Celier * tempdir.adb (Tempdir): Do not use environment variable TMPDIR if it designates a non existent directory. From-SVN: r107012 --- gcc/ada/tempdir.adb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gcc/ada/tempdir.adb b/gcc/ada/tempdir.adb index 7daea87e5c6..a0b8adacac7 100644 --- a/gcc/ada/tempdir.adb +++ b/gcc/ada/tempdir.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2003 Free Software Foundation, Inc. -- +-- Copyright (C) 2003-2005 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- -- @@ -114,7 +114,10 @@ begin Dir : String_Access := Getenv (Tmpdir); begin - if Dir'Length > 0 and then Is_Absolute_Path (Dir.all) then + if Dir'Length > 0 and then + Is_Absolute_Path (Dir.all) and then + Is_Directory (Dir.all) + then Temp_Dir := new String'(Normalize_Pathname (Dir.all)); end if; -- 2.30.2