summaryrefslogtreecommitdiffstats
path: root/src/bvrcommands.c
diff options
context:
space:
mode:
authorAnton L. Šijanec <anton@sijanec.eu>2020-05-05 21:35:34 +0200
committerAnton L. Šijanec <anton@sijanec.eu>2020-05-05 21:35:34 +0200
commit954de8fea4bf669d58c7ae6886bd0bc7558699e0 (patch)
treed25f192b501bb378a62de6c554ee78e6f871863f /src/bvrcommands.c
parentinclude finnally works to a usable extent. (diff)
downloadbverbose-954de8fea4bf669d58c7ae6886bd0bc7558699e0.tar
bverbose-954de8fea4bf669d58c7ae6886bd0bc7558699e0.tar.gz
bverbose-954de8fea4bf669d58c7ae6886bd0bc7558699e0.tar.bz2
bverbose-954de8fea4bf669d58c7ae6886bd0bc7558699e0.tar.lz
bverbose-954de8fea4bf669d58c7ae6886bd0bc7558699e0.tar.xz
bverbose-954de8fea4bf669d58c7ae6886bd0bc7558699e0.tar.zst
bverbose-954de8fea4bf669d58c7ae6886bd0bc7558699e0.zip
Diffstat (limited to 'src/bvrcommands.c')
-rw-r--r--src/bvrcommands.c17
1 files changed, 13 insertions, 4 deletions
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;
}