diff options
-rw-r--r-- | eval.c | 6 | ||||
-rw-r--r-- | tests/test_0064.out | 2 |
2 files changed, 6 insertions, 2 deletions
@@ -388,7 +388,11 @@ static void exec_chdir(const struct BFTW *ftwbuf) { while (end > path && end[-1] != '/') { --end; } - if (end > path) { + if (end == path) { + // The path is something like "foo", so we're already in the + // right directory + return; + } else { *end = '\0'; } diff --git a/tests/test_0064.out b/tests/test_0064.out index 97e97f9..e66db9a 100644 --- a/tests/test_0064.out +++ b/tests/test_0064.out @@ -1,4 +1,4 @@ -basic + basic basic basic |