[gobject-introspection] Windows port: Do not append '/usr/share' to _xdg_data_dirs...



commit 883b9e9a11a5a30037d0c612b20ea9e8af35657d
Author: Dieter Verfaillie <dieterv optionexplicit be>
Date:   Mon Sep 5 17:49:45 2011 +0200

    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 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/giscanner/transformer.py b/giscanner/transformer.py
index 74985ff..4ce2ac0 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)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]