From cf55433f17957c13fc4a345d52d708400215e192 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 25 Jul 2013 13:02:59 +0100 Subject: 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 --- giscanner/giscannermodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"); -- cgit v1.2.1