diff options
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 6 |
1 files changed, 5 insertions, 1 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'; } |