aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--pre-process.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/pre-process.c b/pre-process.c
index 7a1478f6..3fb25082 100644
--- a/pre-process.c
+++ b/pre-process.c
@@ -884,6 +884,12 @@ static void set_stream_include_path(struct stream *stream)
memcpy(m, stream->name, len);
m[len] = 0;
path = m;
+ /* normalize this path */
+ while (path[0] == '.' && path[1] == '/') {
+ path += 2;
+ while (path[0] == '/')
+ path++;
+ }
}
stream->path = path;
}