]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
- fix testcasedir handling
authorMichael Schroeder <mls@suse.de>
Mon, 20 Feb 2012 17:53:52 +0000 (18:53 +0100)
committerMichael Schroeder <mls@suse.de>
Mon, 20 Feb 2012 17:53:52 +0000 (18:53 +0100)
ext/testcase.c

index 16159ef58a56a2cc576df44851f8950c816e5182..6129657cc4b35404e1e1d5c299cc7cb8b4ee4e85 100644 (file)
@@ -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], "<inline>"))
+         if (!strcmp(pieces[2], "<inline>"))
            rfp = fp;
          else
             rfp = fopen(rdata, "r");