* source.c (find_and_open_source): Consistently pass resulting
[deliverable/binutils-gdb.git] / gdb / source.c
index 97f5d46d21935bf0e4d71452def57f0f4969326c..9b464f90e77800c07eda10e6aa80ab53aada138a 100644 (file)
@@ -997,7 +997,16 @@ find_and_open_source (const char *filename,
 
       result = open (*fullname, OPEN_MODE);
       if (result >= 0)
-       return result;
+       {
+         /* Call xfullpath here to be consistent with openp
+            which we use below.  */
+         char *lpath = xfullpath (*fullname);
+
+         xfree (*fullname);
+         *fullname = lpath;
+         return result;
+       }
+
       /* Didn't work -- free old one, try again.  */
       xfree (*fullname);
       *fullname = NULL;
This page took 0.026368 seconds and 4 git commands to generate.