]> git.0d.be Git - empathy.git/blobdiff - libempathy/empathy-utils.c
Try to load dtd and glade files from the srcdir first to aboid having to install...
[empathy.git] / libempathy / empathy-utils.c
index 0e2c4b588d5a8f79913c7d38a8528526146b83d3..4050f46738924c0e6c782e1c379f5449626792ad 100644 (file)
@@ -208,11 +208,15 @@ empathy_xml_validate (xmlDoc      *doc,
        xmlDtd       *dtd;
        gboolean      ret;
 
        xmlDtd       *dtd;
        gboolean      ret;
 
-       path = g_build_filename (DATADIR, "empathy", dtd_filename, NULL);
+       path = g_build_filename (UNINSTALLED_DTD_DIR, dtd_filename, NULL);
+       if (!g_file_test (path, G_FILE_TEST_EXISTS)) {
+               g_free (path);
+               path = g_build_filename (DATADIR, "empathy", dtd_filename, NULL);
+       }
+       empathy_debug (DEBUG_DOMAIN, "Loading dtd file %s", path);
 
        /* The list of valid chars is taken from libxml. */
        escaped = xmlURIEscapeStr (path, ":@&=+$,/?;");
 
        /* The list of valid chars is taken from libxml. */
        escaped = xmlURIEscapeStr (path, ":@&=+$,/?;");
-
        g_free (path);
 
        memset (&cvp, 0, sizeof (cvp));
        g_free (path);
 
        memset (&cvp, 0, sizeof (cvp));