diff -urN uploadpath.orig/uploadpath.admin.inc uploadpath/uploadpath.admin.inc
--- uploadpath.orig/uploadpath.admin.inc	2008-09-08 04:20:02.000000000 -0400
+++ uploadpath/uploadpath.admin.inc	2009-04-01 12:45:59.000000000 -0400
@@ -7,7 +7,7 @@
   $form['uploadpath_prefix'] = array(
     '#type' => 'textfield',
     '#title' => t('Default pattern for the file path prefix'),
-    '#description' => t('Specify the pattern to prefix to file names uploaded with the upload module.  It will be appended after the site files directory (e.g., files) but before the file name itself.  Do not include a leading or trailing slash.  Spaces will be converted to underscores to avoid file system issues.'),
+    '#description' => t('Specify the pattern to prefix to file names uploaded with the upload module.  It will be appended after the site files directory (e.g., files) but before the file name itself.  Do not include a leading or trailing slash.'),
     '#default_value' => variable_get('uploadpath_prefix', '[type]/[yyyy]/[mm]'),
     '#weight' => -9
   );
@@ -30,6 +30,16 @@
     '#weight' => 0,
   );
   
+  $form['misc']['uploadpath_space_replacement'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Space replacement'),
+    '#size' => 1,
+    '#maxlength' => 1,
+    '#default_value' => variable_get('uploadpath_space_replacement', '_'),
+    '#description' => t('Convert spaces to the selected character to avoid file system issues. Leave blank to leave spaces.'),
+    '#weight' => 1,
+  );
+  
   $form['node_types_exclude'] = array(
     '#title' => t('Excluded node types'),
     '#type' => 'fieldset',
diff -urN uploadpath.orig/uploadpath.module uploadpath/uploadpath.module
--- uploadpath.orig/uploadpath.module	2008-09-08 04:20:02.000000000 -0400
+++ uploadpath/uploadpath.module	2009-04-01 13:02:08.000000000 -0400
@@ -65,7 +65,12 @@
               $file_name = $file_path . $file_name;
             }else{
               // apply new, prefixed file name by token replacing the path pattern
-              $file_name = str_replace(array(' ', "\n", "\t"), '_', token_replace($pattern . '/', 'node', $node)) . $file['filename'];
+              if ($rep = variable_get('uploadpath_space_replacement', '_')) {
+                $file_name = str_replace(' ', $rep, token_replace($pattern . '/', 'node', $node)) . $file['filename'];
+              } else {
+                $file_name = token_replace($pattern . '/', 'node', $node) . $file['filename'];
+              }
+              $file_name = str_replace(array("\n", "\t"), '', $file_name);
             }
             // SECURITY NOTE:
             // Tokens include user supplied information and could provide an attack vector.
