]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Don't try to add a slash to actual filenames, only paths...
authorWolfgang (Blub) Bumiller <blub@speed.at>
Fri, 30 Nov 2012 14:26:14 +0000 (15:26 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Fri, 30 Nov 2012 14:26:14 +0000 (15:26 +0100)
ftepp.c

diff --git a/ftepp.c b/ftepp.c
index e7be1e464fd351bd6fd29c4d3bf2e169d062a36e..3700fd39a49878c8742773ac18dc4fcf6e668f82 100644 (file)
--- a/ftepp.c
+++ b/ftepp.c
@@ -994,12 +994,6 @@ static char *ftepp_include_find_path(const char *file, const char *pathfile)
         memcpy(vec_add(filename, len), pathfile, len);
         vec_push(filename, '/');
     }
-    else {
-        len = strlen(pathfile);
-        memcpy(vec_add(filename, len), pathfile, len);
-        if (vec_last(filename) != '/')
-            vec_push(filename, '/');
-    }
 
     len = strlen(file);
     memcpy(vec_add(filename, len+1), file, len);
@@ -1062,7 +1056,7 @@ static bool ftepp_include(ftepp_t *ftepp)
     }
     inlex = lex_open(filename);
     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);
         return false;
     }