From: Viljar Indus Date: Thu, 21 Nov 2024 10:22:00 +0000 (+0200) Subject: ada: Avoid going through symlinks in the json report X-Git-Tag: basepoints/gcc-16~3398 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=07fe98fb1a92944eab83c4254e55f5bfee916a0b;p=thirdparty%2Fgcc.git ada: Avoid going through symlinks in the json report gcc/ada/ChangeLog: * errout.adb (Write_JSON_Location): Avoid going through symbolic links when printing the full name. --- diff --git a/gcc/ada/errout.adb b/gcc/ada/errout.adb index 7e24970f1879..3c499273ab7a 100644 --- a/gcc/ada/errout.adb +++ b/gcc/ada/errout.adb @@ -2372,7 +2372,8 @@ package body Errout is Write_Str ("{""file"":"""); if Full_Path_Name_For_Brief_Errors then Write_JSON_Escaped_String - (System.OS_Lib.Normalize_Pathname (Get_Name_String (Name))); + (System.OS_Lib.Normalize_Pathname + (Get_Name_String (Name), Resolve_Links => False)); else Write_Name (Name); end if;