diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c index bc357bd059..664e519da2 100644 --- a/gdk-pixbuf/gdk-pixbuf-io.c +++ b/gdk-pixbuf/gdk-pixbuf-io.c @@ -277,6 +277,12 @@ correct_prefix (gchar **path) if (strncmp (*path, GTK_PREFIX "/", strlen (GTK_PREFIX "/")) == 0 || strncmp (*path, GTK_PREFIX "\\", strlen (GTK_PREFIX "\\")) == 0) { + if (strlen(*path) > 5 && strncmp (*path - 5, ".libs", 5) == 0) + { + /* We are being run from inside the build tree, and shouldn't mess about. */ + return; + } + /* This is an entry put there by gdk-pixbuf-query-loaders on the * packager's system. On Windows a prebuilt GTK+ package can be * installed in a random location. The gdk-pixbuf.loaders file