26 lines
1008 B
Diff
26 lines
1008 B
Diff
by Nico Golde <nion@debian.org>, slightly modified version
|
|
from Eugenio Paolantonio <me@medesimo.eu>
|
|
Do not build filename if a working full path is given.
|
|
Fixes #644756.
|
|
Index: openbox-3.5.0/obt/xml.c
|
|
===================================================================
|
|
--- openbox-3.5.0.orig/obt/xml.c 2011-10-30 14:13:07.000000000 +0100
|
|
+++ openbox-3.5.0/obt/xml.c 2011-10-30 14:13:10.000000000 +0100
|
|
@@ -127,10 +127,13 @@
|
|
gchar *path;
|
|
struct stat s;
|
|
|
|
- if (!domain && !filename) /* given a full path to the file */
|
|
+ if (!domain && !filename){ /* given a full path to the file */
|
|
path = g_strdup(it->data);
|
|
- else
|
|
+ } else if(filename && filename[0] == '/' && stat(filename, &s) >= 0) {
|
|
+ path = g_strdup(filename);
|
|
+ } else {
|
|
path = g_build_filename(it->data, domain, filename, NULL);
|
|
+ }
|
|
|
|
if (stat(path, &s) >= 0) {
|
|
/* XML_PARSE_BLANKS is needed apparently, or the tree can end up
|
|
|