summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xa.outbin21132 -> 21132 bytes
-rw-r--r--src/bvrcommands.c17
-rw-r--r--test/tape-test.bvr2
-rw-r--r--tmp/output.htm5
4 files changed, 18 insertions, 6 deletions
diff --git a/a.out b/a.out
index 4fc861c..b61da8e 100755
--- a/a.out
+++ b/a.out
Binary files differ
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;
}
diff --git a/test/tape-test.bvr b/test/tape-test.bvr
index 1bf8761..0d4e496 100644
--- a/test/tape-test.bvr
+++ b/test/tape-test.bvr
@@ -1,5 +1,5 @@
<@?i assets/content/global.bvr @>
-<@?i krneki@>
+<@?i krneski @>
# <@?g post_slug @>
# <@?g bvr_include_path @>
# <@?i tape-test-to-includes @>
diff --git a/tmp/output.htm b/tmp/output.htm
index b72385b..0117a70 100644
--- a/tmp/output.htm
+++ b/tmp/output.htm
@@ -19,5 +19,8 @@
-krneki123
+bVerbose include error. File krneski not found.
+command handler for i with argument "krneski" returned an error code.
+
+bvr_inline_command_processor returned an error status.