~ubuntu-branches/ubuntu/saucy/openbox/saucy-proposed

« back to all changes in this revision

Viewing changes to debian/patches/04_fix_xml_load_file.patch

  • Committer: Package Import Robot
  • Author(s): Mateusz Łukasik
  • Date: 2013-10-07 14:58:17 UTC
  • mfrom: (12.1.12 sid)
  • Revision ID: package-import@ubuntu.com-20131007145817-83jqr402jrv0q998
Tags: 3.5.2-3
* debian/control:
  + fix typo in depends openbox-dev package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
by Nico Golde <nion@debian.org>, slightly modified version
 
2
from Eugenio Paolantonio <me@medesimo.eu>
 
3
Do not build filename if a working full path is given.
 
4
Fixes #644756.
 
5
Index: openbox-3.5.0/obt/xml.c
 
6
===================================================================
 
7
--- openbox-3.5.0.orig/obt/xml.c        2011-10-30 14:13:07.000000000 +0100
 
8
+++ openbox-3.5.0/obt/xml.c     2011-10-30 14:13:10.000000000 +0100
 
9
@@ -127,10 +127,13 @@
 
10
         gchar *path;
 
11
         struct stat s;
 
12
 
 
13
-        if (!domain && !filename) /* given a full path to the file */
 
14
+        if (!domain && !filename){ /* given a full path to the file */
 
15
             path = g_strdup(it->data);
 
16
-        else
 
17
+        } else if(filename && filename[0] == '/' && stat(filename, &s) >= 0) {
 
18
+            path = g_strdup(filename);
 
19
+        } else {
 
20
             path = g_build_filename(it->data, domain, filename, NULL);
 
21
+        }
 
22
 
 
23
         if (stat(path, &s) >= 0) {
 
24
             /* XML_PARSE_BLANKS is needed apparently, or the tree can end up
 
25