From b98bf5e84bea2a8163d8e50562ad63f2ecda5cdc Mon Sep 17 00:00:00 2001
From: Houtan Bastani <houtan@dynare.org>
Date: Thu, 30 May 2013 15:29:27 +0200
Subject: [PATCH] preprocessor: config file: if on Windows machine and
 operatingSystem is empty, then check to see if password or remoteDrive is
 empty. otherwise, don't check

---
 preprocessor/ConfigFile.cc | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/preprocessor/ConfigFile.cc b/preprocessor/ConfigFile.cc
index c0c17857bb..61ebf2e426 100644
--- a/preprocessor/ConfigFile.cc
+++ b/preprocessor/ConfigFile.cc
@@ -517,15 +517,18 @@ ConfigFile::checkPass(WarningConsolidation &warnings) const
               exit(EXIT_FAILURE);
             }
 #if defined(_WIN32) || defined(__CYGWIN32__)
-          if (it->second->password.empty())
+          if (it->second->operatingSystem.empty())
             {
-              cerr << "ERROR (node " << it->first << "): the Password option must be passed under Windows for every remote node." << endl;
-              exit(EXIT_FAILURE);
-            }
-          if (it->second->remoteDrive.empty())
-            {
-              cerr << "ERROR (node " << it->first << "): the RemoteDrive option must be passed under Windows for every remote node." << endl;
-              exit(EXIT_FAILURE);
+              if (it->second->password.empty())
+                {
+                  cerr << "ERROR (node " << it->first << "): the Password option must be passed under Windows for every remote node." << endl;
+                  exit(EXIT_FAILURE);
+                }
+              if (it->second->remoteDrive.empty())
+                {
+                  cerr << "ERROR (node " << it->first << "): the RemoteDrive option must be passed under Windows for every remote node." << endl;
+                  exit(EXIT_FAILURE);
+                }
             }
 #endif
           if (it->second->remoteDirectory.empty())
-- 
GitLab