yaffs direct: Fix yaffs_access to follow symbolic links.
[yaffs2.git] / direct / yaffsfs.c
index 0b151a2793b4d3fa2bf1d082c57dec4678767721..2016101702021c0796e2e5f83be791e360ce8fed 100644 (file)
@@ -1842,6 +1842,7 @@ int yaffs_access(const YCHAR *path, int amode)
        yaffsfs_Lock();
 
        obj = yaffsfs_FindObject(NULL,path,0,1, &dir,&notDir);
        yaffsfs_Lock();
 
        obj = yaffsfs_FindObject(NULL,path,0,1, &dir,&notDir);
+       obj = yaffsfs_FollowLink(obj,0);
 
        if(!dir && notDir) 
                yaffsfs_SetError(-ENOTDIR);
 
        if(!dir && notDir) 
                yaffsfs_SetError(-ENOTDIR);