From 954de8fea4bf669d58c7ae6886bd0bc7558699e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20L=2E=20=C5=A0ijanec?= Date: Tue, 5 May 2020 21:35:34 +0200 Subject: another fix, so 404 aka not found files work (show error) --- src/bvrcommands.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/bvrcommands.c b/src/bvrcommands.c index aac4800..f08c0ab 100644 --- a/src/bvrcommands.c +++ b/src/bvrcommands.c @@ -74,11 +74,20 @@ int bvr_handle_include(FILE * input, FILE * output) { while(stream == NULL) { singlepath = strrchr(path, BVR_PATH_SEPARATOR); if(singlepath == NULL) { - stream = fopen(path, "r"); // ob1 fuckery + strcpy(notgoodatnamingvariables, path); + strcat(notgoodatnamingvariables, item); + stream = fopen(notgoodatnamingvariables, "r"); // ob1 fuckery if(stream == NULL) { - fprintf(output, "\nbVerbose include error. File %s not found.\n", item); - fprintf(stderr, "[bvrcommands.c] bvr_handle_include: File %s not found.\n", item); - return FAILURE; + strcpy(notgoodatnamingvariables, path); + strcat(notgoodatnamingvariables, item); + strcat(notgoodatnamingvariables, BVR_COMMAND_FILE_EXT); + stream = fopen(notgoodatnamingvariables, "r"); // ob1 fuckery + if(stream == NULL) { + fprintf(output, "\nbVerbose include error. File %s not found.\n", item); + fprintf(stderr, "[bvrcommands.c] bvr_handle_include: File %s not found.\n", item); + return FAILURE; + } + break; } break; } -- cgit v1.2.3