From 36da610a4d62f1e39c82a843821ccc03ed0f83c6 Mon Sep 17 00:00:00 2001
From: Guillaume Pasero <guillaume.pasero@c-s.fr>
Date: Mon, 1 Oct 2012 18:14:18 +0200
Subject: [PATCH] BUG: 575: InputImageListParameter leave the file existance
 check to the reader

---
 .../otbWrapperInputImageListParameter.cxx            | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Code/ApplicationEngine/otbWrapperInputImageListParameter.cxx b/Code/ApplicationEngine/otbWrapperInputImageListParameter.cxx
index 7019290320..80ea007126 100644
--- a/Code/ApplicationEngine/otbWrapperInputImageListParameter.cxx
+++ b/Code/ApplicationEngine/otbWrapperInputImageListParameter.cxx
@@ -47,8 +47,8 @@ InputImageListParameter::SetListFromFileName(const std::vector<std::string> & fi
     const std::string filename = filenames[i];
     // TODO : when the logger will be available, redirect the exception
     // in the logger (like what is done in MsgReporter)
-    if (!filename.empty()
-        && itksys::SystemTools::FileExists(filename.c_str()))
+    // File existance checked by the reader
+    if (!filename.empty())
       {
       ImageFileReaderType::Pointer reader = ImageFileReaderType::New();
       reader->SetFileName(filename);
@@ -94,8 +94,8 @@ InputImageListParameter::AddFromFileName(const std::string & filename)
 {
   // TODO : when the logger will be available, redirect the exception
   // in the logger (like what is done in MsgReporter)
-  if (!filename.empty()
-      && itksys::SystemTools::FileExists(filename.c_str()))
+  // File existance checked by the reader
+  if (!filename.empty())
     {
     ImageFileReaderType::Pointer reader = ImageFileReaderType::New();
     reader->SetFileName(filename);
@@ -130,8 +130,8 @@ InputImageListParameter::SetNthFileName( const unsigned int id, const std::strin
 
   // TODO : when the logger will be available, redirect the exception
   // in the logger (like what is done in MsgReporter)
-  if (!filename.empty()
-      && itksys::SystemTools::FileExists(filename.c_str()))
+  // File existance checked by the reader
+  if (!filename.empty())
     {
     ImageFileReaderType::Pointer reader = ImageFileReaderType::New();
     reader->SetFileName(filename);
-- 
GitLab