From be7f1d66ba2ab6be1f5e0c735af1cb22de9dfb39 Mon Sep 17 00:00:00 2001
From: Guillaume Pasero <guillaume.pasero@c-s.fr>
Date: Thu, 27 Sep 2012 18:44:44 +0200
Subject: [PATCH] BUG: 579: accept double dash inside filenames in applications

---
 Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx b/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx
index 19abe22baf..8e71eb5e83 100644
--- a/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx
+++ b/Code/Wrappers/CommandLine/otbWrapperCommandLineLauncher.cxx
@@ -837,8 +837,8 @@ bool CommandLineLauncher::CheckUnicity()
 bool CommandLineLauncher::CheckParametersPrefix()
 {
   bool res = true;
-  // Check if the chain "-" appears in the expression
-  if (m_Expression.find("--") != std::string::npos )
+  // Check if the chain " --" appears in the expression, could be a common mistake
+  if (m_Expression.find(" --") != std::string::npos )
     {
     res = false;
     }
-- 
GitLab