* tempdir.adb (Tempdir): Do not use environment variable TMPDIR if it
designates a non existent directory.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107012
138bc75d-0d04-0410-961f-
82ee72b054a4
-- --
-- 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- --
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;