From 2d11d8f1a4deae210fcb068d2e2b33344c93fd66 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 11 Feb 2017 12:02:50 -0600 Subject: [PATCH] rename: An inode with no operations should be treated like a directory for the purposes of rename --- fs/vfs/fs_rename.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/vfs/fs_rename.c b/fs/vfs/fs_rename.c index 162220d86d..924f367b95 100644 --- a/fs/vfs/fs_rename.c +++ b/fs/vfs/fs_rename.c @@ -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;