From 7a9016968bf9390d5cf529772ec549ee4d0819f8 Mon Sep 17 00:00:00 2001 From: AdamPS <AdamPS@2650563.no-reply.drupal.org> Date: Mon, 15 Dec 2014 16:03:30 -0800 Subject: [PATCH] Issue #1982286 by AdamPS: Recoverable fatal error --- plugins/FeedsFileFetcher.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/FeedsFileFetcher.inc b/plugins/FeedsFileFetcher.inc index 0dc5f47e..6f1b3107 100644 --- a/plugins/FeedsFileFetcher.inc +++ b/plugins/FeedsFileFetcher.inc @@ -29,7 +29,7 @@ class FeedsFileFetcherResult extends FeedsFetcherResult { * Overrides parent::getFilePath(). */ public function getFilePath() { - if (!file_exists($this->file_path)) { + if (!is_readable($this->file_path)) { throw new Exception(t('File @filepath is not accessible.', array('@filepath' => $this->file_path))); } return $this->sanitizeFile($this->file_path); @@ -164,8 +164,8 @@ class FeedsFileFetcher extends FeedsFetcher { if (!$scheme || !in_array($scheme, $this->config['allowed_schemes'])) { form_set_error('feeds][FeedsFileFetcher][source', t("The file needs to reside within the site's files directory, its path needs to start with scheme://. Available schemes: @schemes.", array('@schemes' => implode(', ', $this->config['allowed_schemes'])))); } - // Check wether the given path exists. - elseif (!file_exists($values['source'])) { + // Check whether the given path is readable. + elseif (!is_readable($values['source'])) { form_set_error('feeds][FeedsFileFetcher][source', t('The specified file or directory does not exist.')); } } -- GitLab