You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/08/07 02:46:21 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #1524: cromfs:gencromfs fs_cromfs Fix special directory handling

xiaoxiang781216 commented on a change in pull request #1524:
URL: https://github.com/apache/incubator-nuttx/pull/1524#discussion_r466790485



##########
File path: fs/cromfs/fs_cromfs.c
##########
@@ -988,7 +988,7 @@ static int cromfs_opendir(FAR struct inode *mountpt, FAR const char *relpath,
 
   /* Verify that the node is a directory */
 
-  if (!S_ISDIR(node->cn_mode))
+  if (!S_ISDIR(node->cn_mode) && !S_ISLNK(node->cn_mode))

Review comment:
       for link we need look at the target to decide whether is a directory, If we don't want to support the link now, it's better to:
   if (S_ISLNK(node->cn_mode))
     {
       /* Not implement yet */
   
       return -ENOSYS;
     }
   else if (!S_ISDIR(node->cn_mode))
     {
       return -ENOTDIR;
     }
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org