aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jim-file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/jim-file.c b/jim-file.c
index 8e3d9d6..5c962ac 100644
--- a/jim-file.c
+++ b/jim-file.c
@@ -288,6 +288,7 @@ static int file_cmd_join(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
else if (part[0] == '.') {
if (part[1] == '/') {
part += 2;
+ len -= 2;
}
else if (part[1] == 0 && last != newname) {
/* Adding '.' to an existing path does nothing */