--- stream_wrappers-allow_symlinks-1008402-64.patch	2012-05-04 21:25:12.000000000 +0200
+++ stream_wrappers-allow_symlinks-1008402-65.patch	2012-05-07 06:08:10.000000000 +0200
@@ -1,5 +1,16 @@
+From c90982f2369bedeef86435148614a2a05e5b1377 Mon Sep 17 00:00:00 2001
+From: tomogden <tomogden@441644.no-reply.drupal.org>
+Date: Mon, 7 May 2012 00:02:10 -0400
+Subject: [PATCH] Issue #441644 by tekante,pillarsdotnet,kathyh,xjm,tomogden:
+ Allow the use of symlinks within the files directory.
+
+---
+ core/lib/Drupal/Core/StreamWrapper/LocalStream.php |   30 +++++++++++-----
+ core/modules/system/tests/file.test                |   36 ++++++++++++++++++++
+ 2 files changed, 57 insertions(+), 9 deletions(-)
+
 diff --git a/core/lib/Drupal/Core/StreamWrapper/LocalStream.php b/core/lib/Drupal/Core/StreamWrapper/LocalStream.php
-index 0cd76e0..3f74589 100644
+index 0cd76e0c8c1d2a186d6038ee009f27b030ff0b7a..1c94b67e215de0eea8a5516dfd4f726ff8b451fa 100644
 --- a/core/lib/Drupal/Core/StreamWrapper/LocalStream.php
 +++ b/core/lib/Drupal/Core/StreamWrapper/LocalStream.php
 @@ -161,17 +161,29 @@ abstract class LocalStream implements StreamWrapperInterface {
@@ -23,7 +34,7 @@
 +    // Get the target name, without any directory components.
 +    $target_name = drupal_basename($repository . $target);
 +    // A directory component can point outside its parent directory if the path
-+    // separator ('/' or '\') is followed either by '..' to reference the parent
++    // separator ('/' or '\') is followed by '..' to reference the parent
 +    // directory.
 +    $pattern = '@(/|\\\\)\.\.@';
 +    // Check whether the target can possibly point outside its parent.
@@ -42,7 +53,7 @@
  
    /**
 diff --git a/core/modules/system/tests/file.test b/core/modules/system/tests/file.test
-index ab93009..57020b8 100644
+index ab930090fee2ae2ae70e9b5d63d81dda6ebef19e..edcf4bbb5e093e96937e76f19f036472baf5c45f 100644
 --- a/core/modules/system/tests/file.test
 +++ b/core/modules/system/tests/file.test
 @@ -1034,6 +1034,42 @@ class FileDirectoryTest extends FileTestCase {
@@ -88,12 +99,6 @@
  }
  
  /**
-@@ -2440,7 +2476,7 @@ class FileDownloadTest extends FileTestCase {
-     // when $script_path is not empty (i.e., when not using clean URLs).
-     $script_path_original = $script_path;
-     foreach (array('', 'index.php/') as $script_path) {
--      $this->checkUrl('public', '', $basename, $base_url . '/' . file_stream_wrapper_get_instance_by_scheme('public')->getDirectoryPath() . '/' . $basename_encoded);
-+      $this->checkUrl('public', '', $basename, $base_url . '/' . file_stream_wrapper_get_instance_by_scheme('public')->getDirectoryPath() . '/' . $basename_encoded, 0);
-       $this->checkUrl('private', '', $basename, $base_url . '/' . $script_path . 'system/files/' . $basename_encoded);
-     }
-     $script_path = $script_path_original;
+-- 
+1.7.10.819.g661bfd5.dirty
+
