diff --git a/CHANGELOG.txt b/CHANGELOG.txt index a02516b4afcf095ab0ffc89ca8c2245fda1ea84d..9f60b54f9dd096f6bd7cd94313d29fe33ac09427 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,7 +2,8 @@ Feeds 6.x 1.0 XXXXXXXXXXXXXXXXXX -------------------------------- - +- #851570 morningtime: Avoid trailing slashes when passing file paths to + file_check_directory(). - #836090 andrewlevine, alex_b: Include mapping configuration in hash. - #853156 alex_b: Support real updates of terms. - #858684 alex_b: Fix notices when file not found. diff --git a/includes/FeedsBatch.inc b/includes/FeedsBatch.inc index 1981205c6dcdba028cdce95f96ed5519cc8fc1b3..6d871aef19c0b400eea76b8651f5845e9c08460c 100644 --- a/includes/FeedsBatch.inc +++ b/includes/FeedsBatch.inc @@ -94,11 +94,11 @@ class FeedsImportBatch extends FeedsBatch { */ public function getFilePath() { if (!isset($this->file_path)) { - $dir = file_directory_path() .'/feeds/'; + $dir = file_directory_path() .'/feeds'; if (!file_check_directory($dir, TRUE)) { throw new Exception(t('Feeds directory either cannot be created or is not writable.')); } - $dest = file_destination($dir . get_class($this) .'_'. drupal_get_token($this->url) .'_'. time(), FILE_EXISTS_RENAME); + $dest = file_destination($dir . '/' . get_class($this) .'_'. drupal_get_token($this->url) .'_'. time(), FILE_EXISTS_RENAME); $this->file_path = file_save_data($this->getRaw(), $dest); if($this->file_path === 0) { throw new Exception(t('Cannot write content to %dest', array('%dest' => $dest)));