- output = yaffs_rename( "/yaffs2/foo" , RENAME_DIR_PATH);
- if (output<0){
- print_message("failed to rename a file over an empty directory\n",2);
+ output=yaffs_rename(FILE_PATH,RENAME_DIR_PATH);
+ if (output==-1){
+ error_code=yaffs_get_error();
+ if (abs(error_code)==EISDIR){
+ return 1;
+ } else {
+ print_message("different error than expected\n",2);
+ return -1;
+ }
+ } else {
+ print_message("renamed a file over a directory (which is a bad thing)\n",2);