From 6af9c29d6338cb634906b48819ea2840fe15ff3f Mon Sep 17 00:00:00 2001 From: webchick Date: Thu, 26 Apr 2012 11:33:42 -0700 Subject: Issue #1542854 by drumm, BTMash: Fixed system_update_7061() converts filepaths too aggressively. --- modules/system/system.install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/system/system.install') diff --git a/modules/system/system.install b/modules/system/system.install index 0b4e1faa1..6161eb333 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -2791,7 +2791,7 @@ function system_update_7061(&$sandbox) { foreach ($revision['file'][LANGUAGE_NONE] as $delta => $file) { // We will convert filepaths to uri using the default scheme // and stripping off the existing file directory path. - $file['uri'] = $scheme . str_replace($basename, '', $file['filepath']); + $file['uri'] = $scheme . preg_replace('!^' . $basename . '!', '', $file['filepath']); $file['uri'] = file_stream_wrapper_uri_normalize($file['uri']); unset($file['filepath']); // Insert into the file_managed table. -- cgit v1.2.3