head 1.1; access; symbols pkgsrc-2026Q1:1.1.0.4 pkgsrc-2026Q1-base:1.1 pkgsrc-2025Q4:1.1.0.2 pkgsrc-2025Q4-base:1.1; locks; strict; comment @-- @; 1.1 date 2025.10.07.20.45.10; author dkazankov; state Exp; branches; next ; commitid EBysylHjpPyMbGdG; desc @@ 1.1 log @ada-gnatcoll-core-25: bug fixing * Add tests support * Many (not all) NetBSD port bugs fixed after tests: PASS 431 FAIL 16 SKIP 1 @ text @$NetBSD: patch-core_src_os_unix_libc-wrappers.c,v 1.1 2025/07/10 18:52:41 dkazankov Exp $ There is no point in continuing if this is a directory. It also doesn't work correctly on NetBSD. --- core/src/os/gnatcoll-os-fsutil.adb.orig 2024-09-24 12:28:32.000000000 +0300 +++ core/src/os/gnatcoll-os-fsutil.adb @@@@ -71,6 +71,7 @@@@ return Result_Type is FD : FS.File_Descriptor; + FA : File_Attributes; Context : State_Type; N : Integer; Buffer : String_Access; @@@@ -84,6 +85,12 @@@@ raise OS_Error with "Failed to open " & String (Path); end if; + FA := Fstat (FD); + if Is_Directory (FA) then + FS.Close (FD); + raise OS_Error with String (Path) & " is a directory"; + end if; + Buffer := new String (1 .. Buffer_Size); begin @