From 9851b66cf06c1a9b9fc3dcb9cc922ac5094c4e31 Mon Sep 17 00:00:00 2001
From: Julien Michel <julien.michel@orfeo-toolbox.org>
Date: Wed, 29 Apr 2015 17:32:26 +0200
Subject: [PATCH] BUG: Fixing bug #1037

---
 .../Wrappers/CommandLine/src/otbWrapperCommandLineLauncher.cxx  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Modules/Wrappers/CommandLine/src/otbWrapperCommandLineLauncher.cxx b/Modules/Wrappers/CommandLine/src/otbWrapperCommandLineLauncher.cxx
index 4b73e713dc..7fba8d1b12 100644
--- a/Modules/Wrappers/CommandLine/src/otbWrapperCommandLineLauncher.cxx
+++ b/Modules/Wrappers/CommandLine/src/otbWrapperCommandLineLauncher.cxx
@@ -624,7 +624,7 @@ CommandLineLauncher::ParamResultType CommandLineLauncher::LoadParameters()
         {
         std::string filename = m_Application->GetParameterString(paramKey);
         itksys::String path = itksys::SystemTools::GetFilenamePath(filename);
-        if (!itksys::SystemTools::FileIsDirectory(path.c_str()))
+        if (path!="" && !itksys::SystemTools::FileIsDirectory(path.c_str()))
           {
           std::cerr <<"ERROR: Directory doesn't exist : "<< path.c_str() << std::endl;
           return WRONGPARAMETERVALUE;
-- 
GitLab