Don't try to add a slash to actual filenames, only paths...

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-11-30 15:26:14 +01:00
parent 645bd212d7
commit 7f915c0f2a

View file

@ -994,12 +994,6 @@ static char *ftepp_include_find_path(const char *file, const char *pathfile)
memcpy(vec_add(filename, len), pathfile, len); memcpy(vec_add(filename, len), pathfile, len);
vec_push(filename, '/'); vec_push(filename, '/');
} }
else {
len = strlen(pathfile);
memcpy(vec_add(filename, len), pathfile, len);
if (vec_last(filename) != '/')
vec_push(filename, '/');
}
len = strlen(file); len = strlen(file);
memcpy(vec_add(filename, len+1), file, len); memcpy(vec_add(filename, len+1), file, len);
@ -1062,7 +1056,7 @@ static bool ftepp_include(ftepp_t *ftepp)
} }
inlex = lex_open(filename); inlex = lex_open(filename);
if (!inlex) { if (!inlex) {
ftepp_error(ftepp, "failed to open include file `%s`", filename); ftepp_error(ftepp, "open failed on include file `%s`", filename);
vec_free(filename); vec_free(filename);
return false; return false;
} }