summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDieter Verfaillie <dieterv@optionexplicit.be>2011-09-05 17:49:45 +0200
committerDieter Verfaillie <dieterv@optionexplicit.be>2011-09-07 22:00:29 +0200
commit883b9e9a11a5a30037d0c612b20ea9e8af35657d (patch)
treee222d48b37ca0273b96b23e1b10fa614b6f4fcba
parent2e711659d036fcf5a7c2e7201bb1d0fd7334ebb5 (diff)
downloadgobject-introspection-883b9e9a11a5a30037d0c612b20ea9e8af35657d.tar.gz
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
-rw-r--r--giscanner/transformer.py8
1 files 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)