Index: plugins/views_data_export_plugin_display_export.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views_data_export/plugins/Attic/views_data_export_plugin_display_export.inc,v
retrieving revision 1.1.2.1
diff -u -p -r1.1.2.1 views_data_export_plugin_display_export.inc
--- plugins/views_data_export_plugin_display_export.inc	24 Nov 2010 13:10:04 -0000	1.1.2.1
+++ plugins/views_data_export_plugin_display_export.inc	24 Nov 2010 22:17:46 -0000
@@ -635,7 +635,17 @@ class views_data_export_plugin_display_e
    */
   protected function outputfile_create() {
 
-    $path = tempnam(realpath(file_directory_temp() . '/views_plugin_display'), 'views_data');
+    $path = realpath(file_directory_temp() . '/views_plugin_display');
+
+    // Make sure the directory exists first.
+    if (!file_check_directory($path, FILE_CREATE_DIRECTORY)) {
+      // Create the file.
+      if (($output_filename = file_create_path($path)) === FALSE) {
+        $this->abort_export(t('Could not create temporary output file for result export (@file). Check permissions.', array ('@file' => $path)));
+      }
+    }
+
+    $path = tempnam($path, 'views_data');
 
     // Make sure the directory exists first.
     if (!file_check_directory(dirname($path), FILE_CREATE_DIRECTORY)) {
