rename: An inode with no operations should be treated like a directory for the purposes of rename

This commit is contained in:
Gregory Nutt 2017-02-11 12:02:50 -06:00
parent bd7d3a92f5
commit 2d11d8f1a4
1 changed files with 2 additions and 2 deletions

View File

@ -117,10 +117,10 @@ next_subdir:
}
#endif
/* We found it and it appears to be a "normal" inode. Is it a
* directory (i.e, an inode with children)?
* directory (i.e, an operation-less inode or an inode with children)?
*/
if (newinode->i_child != NULL)
if (newinode->u.i_ops == NULL || newinode->i_child != NULL)
{
FAR char *subdirname;
FAR char *tmp;