Skip to content

Commit 5c1ea6d

Browse files
committed
Fix CE on Is_Directory under Windows with a one char dir (e.g. ".")
Fixes regression on gnatcheck tests UA18-031 and UB24-014 Change-Id: I86f62194e109048f0f8d3df9476d19eb9532a198
1 parent 9f469bc commit 5c1ea6d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/gnatcoll-io-native.adb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
------------------------------------------------------------------------------
22
-- G N A T C O L L --
33
-- --
4-
-- Copyright (C) 2009-2018, AdaCore --
4+
-- Copyright (C) 2009-2022, AdaCore --
55
-- --
66
-- This library is free software; you can redistribute it and/or modify it --
77
-- under terms of the GNU General Public License as published by the Free --
@@ -342,6 +342,7 @@ package body GNATCOLL.IO.Native is
342342
(File : not null access Native_File_Record) return Boolean is
343343
begin
344344
if GNAT.OS_Lib.Directory_Separator = '\'
345+
and then File.Full'Length > 1
345346
and then File.Full (File.Full'First .. File.Full'First + 1) = "\\"
346347
then
347348
-- There is an issue with (at least) GNAT 6.2 when Is_Directory

0 commit comments

Comments
 (0)