relpath: Properly handle a "." directory name.
diff --git a/tools/relpath.c b/tools/relpath.c index ceb1d36..117ecef 100644 --- a/tools/relpath.c +++ b/tools/relpath.c
@@ -30,6 +30,9 @@ #define DIR_END(p) (*(p) == 0 || *(p) == '/') const char *start; + /* a path of "." is equivalent to an empty path */ + if (!strcmp( from, "." )) from = ""; + *dotdots = 0; for (;;) {