summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--files_map.adb3
1 files changed, 3 insertions, 0 deletions
diff --git a/files_map.adb b/files_map.adb
index c6525bd..4aff442 100644
--- a/files_map.adb
+++ b/files_map.adb
@@ -757,6 +757,9 @@ package body Files_Map is
declare
Filename : String := Get_Pathname (Directory, Name, True);
begin
+ if not Is_Regular_File(Filename) then
+ return No_Source_File_Entry;
+ end if;
Fd := Open_Read (Filename'Address, Binary);
if Fd = Invalid_FD then
return No_Source_File_Entry;