From: Michael Chase-S. <mc...@us...> - 2013-05-21 16:48:10
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "sfcb - Small Footprint CIM Broker". The branch, master has been updated via c73e360e6492f0f4106f03e94d10cc57abcb32f0 (commit) from 038b132f010f3a74b27aa68203ce833250d24846 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c73e360e6492f0f4106f03e94d10cc57abcb32f0 Author: Michael Chase-Salerno <br...@li...> Date: Tue May 21 12:46:56 2013 -0400 [sfcb-tix:#48] mofc: Allow absoltute paths in #pragma include Patch contribution by Jan Safranek ----------------------------------------------------------------------- Summary of changes: contributions.txt | 1 + mofpp.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/contributions.txt b/contributions.txt index b1dbb65..bf7dd40 100644 --- a/contributions.txt +++ b/contributions.txt @@ -226,3 +226,4 @@ Jan Safranek, Red Hat --------------------- 05/16/2013 [sfcb-tix:#37] indCIMXmlHandler coredumps in IndCIMXMLHandlerInvokeMethod with Embedded Instances 05/17/2013 [sfcb-tix:#44] Escape XML for Embedded Instances Instead of Using CDATA +04/08/2013 [sfcb-tix:#48] mofc: Allow absoltute paths in #pragma include diff --git a/mofpp.c b/mofpp.c index 68615d1..9e39031 100644 --- a/mofpp.c +++ b/mofpp.c @@ -60,8 +60,15 @@ incOK(char *str, char **s, char **e, char **ifn, FILE ** f) if ((*e = strchr(str, '"'))) { ch = **e; **e = 0; - strcpy(fn, path); - strcat(fn, str); + if (str[0] != '\\' && str[0] != '/') { + /* str is relative path */ + strcpy(fn,path); + strcat(fn,str); + } else { + /* str is absolute path */ + strcpy(fn, str); + } + *ifn = strdup(fn); **e = ch; (*e)++; hooks/post-receive -- sfcb - Small Footprint CIM Broker |