From 2be7a18b206c0c9537e15a360b9c277a86cb1dce Mon Sep 17 00:00:00 2001 From: onefang Date: Tue, 14 Sep 2021 12:11:02 +1000 Subject: Put back the stat() of the session Lua file. --- src/sledjchisl/sledjchisl.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index 87af137..3f420c6 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c @@ -1045,7 +1045,13 @@ int LuaToHash(reqData *Rd, char *file, char *var, qhashtbl_t *tnm, int ret, stru if (-1 == clock_gettime(CLOCK_REALTIME, &then)) perror_msg("Unable to get the time."); I("Reading %s file %s", type, file); - if (!Lua2hashtbl(file, tnm, var)) + if (0 != stat(file, st)) // Don't delete this in future, the caller wants st filled. + { + D("No %s file.", file); + perror_msg("Unable to stat %s", file); + ret++; + } + else if (!Lua2hashtbl(file, tnm, var)) { bitch(Rd, "Broken thing.", "Can't run file."); ret++; -- cgit v1.1