Index: components/file.inc
===================================================================
--- components/file.inc	(revision 268)
+++ components/file.inc	(working copy)
@@ -633,7 +633,17 @@
 function webform_file_url($filepath) {
   if (!empty($filepath)) {
     $info = pathinfo($filepath);
-    $file_url = file_create_url($info['dirname'] . '/' . rawurlencode($info['basename']));
+    switch (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC)) {
+      case FILE_DOWNLOADS_PUBLIC:
+        $path = $info['dirname'] . '/' . rawurlencode($info['basename']);
+        break;
+      case FILE_DOWNLOADS_PRIVATE:
+        // Private file paths must not be encoded as they are run through url()
+        // which performs the file encoding.
+        $path = $info['dirname'] . '/' . $info['basename'];
+        break;
+    }
+    $file_url = file_create_url($path);
   }
   return isset($file_url) ? $file_url : '';
 }
