From 30c5623dd2a3b310e7a86e5ab2085ab086c6b16e Mon Sep 17 00:00:00 2001
From: Alex Barth <alex_b@53995.no-reply.drupal.org>
Date: Fri, 3 Sep 2010 21:01:18 +0000
Subject: [PATCH] #878528 Sutharsan: Don't show file in UI if file does not
 exist.

---
 CHANGELOG.txt                | 1 +
 plugins/FeedsFileFetcher.inc | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 63de8a10..6204d910 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -3,6 +3,7 @@
 Feeds 6.x 1.0 XXXXXXXXXXXXXXXXXX
 --------------------------------
 
+- #878528 Sutharsan: Don't show file in UI if file does not exist.
 - #901798 alex_b: Fix time off in SitemapParser.
 - #885724 eliotttf: Avoid array_flip() on non scalars.
 - #885052 Hanno: Fix small typo in access rights.
diff --git a/plugins/FeedsFileFetcher.inc b/plugins/FeedsFileFetcher.inc
index 0ba80a98..52ad362b 100644
--- a/plugins/FeedsFileFetcher.inc
+++ b/plugins/FeedsFileFetcher.inc
@@ -57,7 +57,7 @@ class FeedsFileFetcher extends FeedsFetcher {
    */
   public function sourceForm($source_config) {
     $form = $info = array();
-    if (!empty($source_config['source'])) {
+    if (!empty($source_config['source']) && file_exists($source_config['source'])) {
       $info = array(
         'path' => $source_config['source'],
         'size' => filesize(realpath($source_config['source'])),
-- 
GitLab