summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libdiskfs/dir-lookup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libdiskfs/dir-lookup.c b/libdiskfs/dir-lookup.c
index 0b3cea14..0eaba6c3 100644
--- a/libdiskfs/dir-lookup.c
+++ b/libdiskfs/dir-lookup.c
@@ -132,7 +132,8 @@ diskfs_S_dir_lookup (struct protid *dircred,
*retry = FS_RETRY_REAUTH;
*returned_port = dircred->po->dotdotport;
*returned_port_poly = MACH_MSG_TYPE_COPY_SEND;
- strcpy (retryname, nextname);
+ if (!lastcomp)
+ strcpy (retryname, nextname);
error = 0;
goto out;
}