From: Michael Schroeder Date: Mon, 20 Feb 2012 17:53:52 +0000 (+0100) Subject: - fix testcasedir handling X-Git-Tag: BASE-SuSE-Code-12_2-Branch~150 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=527eab20fa8b5225b3c9d8420cfc09cd9965ceba;p=thirdparty%2Flibsolv.git - fix testcasedir handling --- diff --git a/ext/testcase.c b/ext/testcase.c index 16159ef5..6129657c 100644 --- a/ext/testcase.c +++ b/ext/testcase.c @@ -1525,7 +1525,7 @@ testcase_read(Pool *pool, FILE *fp, char *testcase, Queue *job, char **resultp, return 0; } testcasedir = solv_strdup(testcase); - if ((s = strchr(testcasedir, '/')) != 0) + if ((s = strrchr(testcasedir, '/')) != 0) s[1] = 0; else *testcasedir = 0; @@ -1708,7 +1708,7 @@ testcase_read(Pool *pool, FILE *fp, char *testcase, Queue *job, char **resultp, } rdata = pool_tmpjoin(pool, testcasedir, pieces[2], 0); - if (!strcmp(pieces[1], "")) + if (!strcmp(pieces[2], "")) rfp = fp; else rfp = fopen(rdata, "r");