fix #8305, symlink bug.

This commit is contained in:
geniusgogo 2023-12-06 19:03:28 +08:00 committed by Meco Man
parent 4bd5c31dac
commit 073761fdbe
1 changed files with 7 additions and 2 deletions

View File

@ -250,6 +250,13 @@ char *dfs_nolink_path(struct dfs_mnt **mnt, char *fullpath, int mode)
rt_memcpy(path + index, fp, i);
path[index + i] = '\0';
/* the last should by mode process. */
if ((fp[i] == '\0') && (!mode))
{
break;
}
fp += i;
dentry = dfs_dentry_lookup(*mnt, path, 0);
@ -307,8 +314,6 @@ _ERR_RET:
path = RT_NULL;
}
//rt_kprintf("%s: %s => %s\n", __FUNCTION__, fullpath, path);
return path;
}