From 883b9e9a11a5a30037d0c612b20ea9e8af35657d Mon Sep 17 00:00:00 2001 From: Dieter Verfaillie Date: Mon, 5 Sep 2011 17:49:45 +0200 Subject: Windows port: Do not append '/usr/share' to _xdg_data_dirs... ... on Windows as it points to the MinGW installation directory, which doesn't have any .gir files to start with anyway. https://bugzilla.gnome.org/show_bug.cgi?id=620566 --- giscanner/transformer.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/giscanner/transformer.py b/giscanner/transformer.py index 74985ffe..4ce2ac0e 100644 --- a/giscanner/transformer.py +++ b/giscanner/transformer.py @@ -38,8 +38,12 @@ class TransformerException(Exception): pass -_xdg_data_dirs = [x for x in os.environ.get('XDG_DATA_DIRS', '').split(':') \ - + [DATADIR, '/usr/share'] if x] +_xdg_data_dirs = [x for x in os.environ.get('XDG_DATA_DIRS', '').split(os.pathsep)] +_xdg_data_dirs.append(DATADIR) + +if os.name != 'nt': + _xdg_data_dirs.append('/usr/share') + class Transformer(object): namespace = property(lambda self: self._namespace) -- cgit v1.2.1