failtest: replay --failpath correctly on really failing opens.
[ccan] / ccan / failtest / failtest.c
index bac0aa350ac24378e8af2b949cb0781a7699906a..f79768d87877f3ff7c8d6a3865842c0a3ee85ceb 100644 (file)
@@ -701,7 +701,7 @@ int failtest_open(const char *pathname,
                free((char *)call.pathname);
        p->u.open.ret = open(pathname, call.flags, call.mode);
 
-       if (!failpath && p->u.open.ret == -1) {
+       if (p->u.open.ret == -1) {
                p->fail = false;
                p->error = errno;
        } else if (should_fail(p)) {