]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Avoid going through symlinks in the json report
authorViljar Indus <indus@adacore.com>
Thu, 21 Nov 2024 10:22:00 +0000 (12:22 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Thu, 12 Dec 2024 09:58:01 +0000 (10:58 +0100)
gcc/ada/ChangeLog:

* errout.adb (Write_JSON_Location): Avoid going through
symbolic links when printing the full name.

gcc/ada/errout.adb

index 7e24970f1879d78b53090f24811f3ab0e6c23ee6..3c499273ab7a0dc3ce7bab6377ed52f013f3f11d 100644 (file)
@@ -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;