wok-next view openbox/stuff/patches/04_fix_xml_load_file.patch @ rev 21019

tor update: 0.3.3.7 -> 0.3.3.10
author Erkan Yilmaz <erkan@slitaz.org>
date Sun Oct 28 14:13:49 2018 +0000 (2018-10-28)
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