int test_yaffs_rename_EINVAL_clean(void)
{
int output = 0;
- if (0 == yaffs_access(RENAME_PATH,0)) {
+ if (0 == yaffs_access(RENAME_PATH,0) && 0 != yaffs_access(DIR_PATH,0)) {
output = yaffs_rename(RENAME_PATH,FILE_PATH);
if (output < 0) {
print_message("failed to remove the directory\n",2);