Index: feedapi.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/feedapi/feedapi.module,v
retrieving revision 1.23.2.119.2.59
diff -u -p -r1.23.2.119.2.59 feedapi.module
--- feedapi.module	18 Jun 2009 14:11:43 -0000	1.23.2.119.2.59
+++ feedapi.module	18 Jun 2009 19:29:37 -0000
@@ -590,7 +590,8 @@ function feedapi_node_validate($form, &$
   if (empty($form_state['values']['feedapi']['feedapi_url']) && !$has_upload) {
     form_set_error('source', t('The Feed URL or uploading a file is required.'));
   }
-  else {
+   else {
+    $error = FALSE;
     if ($has_upload) {
       $form_state['values']['feedapi']['feedapi_url'] = file_create_url($file->filepath);
     }
@@ -603,17 +604,21 @@ function feedapi_node_validate($form, &$
     if (empty($form_state['values']['title']) && isset($feed->title)) {
       form_set_value($form['title'], $feed->title, $form_state);
     }
-    if (isset($form['body_field']['body']) && empty($form_state['values']['body']) && isset($feed->description)) {
+    if (isset($form['body_field']) && empty($form_state['values']['body']) && isset($feed->description)) {
       form_set_value($form['body_field']['body'], $feed->description, $form_state);
     }
     if (empty($form_state['values']['title'])) {
+      $error = TRUE;
       if (!$has_upload) {
         form_set_error('title', t('Title could not be retrieved from feed.'));
       }
-      else {
+      else {        
         form_set_error('title', t('Title could not be detected. Make sure that the uploaded file is a valid feed.'));
       }
     }
+    if (!$error) {
+      file_set_status($file, 1);
+    }
   }
 }
 
