summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2013-07-25 13:02:59 +0100
committerColin Walters <walters@verbum.org>2013-07-28 17:48:06 -0400
commitcf55433f17957c13fc4a345d52d708400215e192 (patch)
treeb51a9ac25a588b650430366c8f56c46f7fdf5791
parent242210d8d5fe5a1c2e607a2d1f3ef4077ecab532 (diff)
downloadgobject-introspection-cf55433f17957c13fc4a345d52d708400215e192.tar.gz
scanner: Consistently use realpath() on input filenames
The scanner has some logic to compare the filenames specified on the command line against files it will parse. For the latter, it uses g_realpath(). With this patch, we also use g_realpath() on the command line arguments. This fixes g-i when used inside jhbuild in a gnome-ostree VM, which has a symbolic link /home -> /sysroot/home. This caused a realpath mismatch, and then we'd ignore the input source files. It'd be best to get out of the realpath business entirely...but a patch to do that seems more likely to break. https://bugzilla.gnome.org/show_bug.cgi?id=704864
-rw-r--r--giscanner/giscannermodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/giscanner/giscannermodule.c b/giscanner/giscannermodule.c
index a5686ea3..182d8438 100644
--- a/giscanner/giscannermodule.c
+++ b/giscanner/giscannermodule.c
@@ -515,7 +515,7 @@ pygi_source_scanner_lex_filename (PyGISourceScanner *self,
if (!PyArg_ParseTuple (args, "s:SourceScanner.lex_filename", &filename))
return NULL;
- self->scanner->current_filename = g_strdup (filename);
+ self->scanner->current_filename = g_realpath (filename);
if (!gi_source_scanner_lex_filename (self->scanner, filename))
{
g_print ("Something went wrong during lexing.\n");