wok-next view openbox/stuff/patches/04_fix_xml_load_file.patch @ rev 20616
xrdp: up 0.9.3.1; zopfli: fix build; gcc61: attempt to fix; add gcc6 (latest among 6.x.x).
gcc61 and gcc6 are broken now.
gcc61 and gcc6 are broken now.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Apr 21 05:15:11 2018 +0300 (2018-04-21) |
parents | |
children |
line source
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;
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 + }
23 if (stat(path, &s) >= 0) {
24 /* XML_PARSE_BLANKS is needed apparently, or the tree can end up