https://gcc.gnu.org/g:07fe98fb1a92944eab83c4254e55f5bfee916a0b

commit r15-6155-g07fe98fb1a92944eab83c4254e55f5bfee916a0b
Author: Viljar Indus <in...@adacore.com>
Date:   Thu Nov 21 12:22:00 2024 +0200

    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:
---
 gcc/ada/errout.adb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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;

Reply via email to