+ yaffs_Object *obj;
+
+ if(!backwardScanning)
+ {
+ // Handle YAFFS1 forward scanning case
+ // For YAFFS1 we always do the deletion
+
+ }
+ else
+ { // Handle YAFFS2 case (backward scanning)
+ // If the shadowed object exists then ignore.
+ if(yaffs_FindObjectByNumber(dev,objId))
+ {
+ return;
+ }
+ }
+
+ // Let's create it (if it does not exist) assuming it is a file so that it can do shrinking etc.
+ // We put it in unlinked dir to be cleaned up after the scanning
+ obj = yaffs_FindOrCreateObjectByNumber(dev,objId,YAFFS_OBJECT_TYPE_FILE);
+ yaffs_AddObjectToDirectory(dev->unlinkedDir,obj);
+ obj->variant.fileVariant.shrinkSize = 0;
+ obj->valid = 1; // So that we don't read any other infor for this file
+