From f81bdc2de2c32da88f7f6a34ed5f6c1fffc395c5 Mon Sep 17 00:00:00 2001
From: git <git@43475.no-reply.drupal.org>
Date: Mon, 28 May 2012 08:25:48 -0300
Subject: [PATCH] Issue #1515204 by gnucifer: Malformed destination uri in
 FeedsEnclosure.

---
 plugins/FeedsParser.inc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/plugins/FeedsParser.inc b/plugins/FeedsParser.inc
index ac53bc41..23bc591a 100644
--- a/plugins/FeedsParser.inc
+++ b/plugins/FeedsParser.inc
@@ -349,7 +349,10 @@ class FeedsEnclosure extends FeedsElement {
           require_once drupal_get_path('module', 'transliteration') . '/transliteration.inc';
           $filename = transliteration_clean_filename($filename);
         }
-        $file = file_save_data($this->getContent(), "$destination/$filename");
+        if(file_uri_target($destination)) {
+          $destination .= trim($destination, '/') . '/';
+        }
+        $file = file_save_data($this->getContent(), $destination . $filename);
       }
 
       // We couldn't make sense of this enclosure, throw an exception.
-- 
GitLab