From d74a86b383b1b0dd039ec4e97f04240e50dadc0c Mon Sep 17 00:00:00 2001
From: Michael Whitty <michael.whitty@stfc.ac.uk>
Date: Fri, 1 Apr 2011 11:26:55 +0000
Subject: [PATCH] fixes #2646 - fix bug that stopped Mantid initialising if
 some directories didn't exist/were inaccessible.

---
 Code/Mantid/Framework/Kernel/src/ConfigService.cpp | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/Code/Mantid/Framework/Kernel/src/ConfigService.cpp b/Code/Mantid/Framework/Kernel/src/ConfigService.cpp
index 7cd0cdad3ea..1e1ccda4448 100644
--- a/Code/Mantid/Framework/Kernel/src/ConfigService.cpp
+++ b/Code/Mantid/Framework/Kernel/src/ConfigService.cpp
@@ -483,12 +483,21 @@ std::string ConfigServiceImpl::makeAbsolute(const std::string & dir, const std::
   {
     required = it->second;
   }
-  if (required && !Poco::File(converted).exists())
+  try
+  {
+    if (required && !Poco::File(converted).exists())
+    {
+      g_log.warning() << "Required properties path \"" << converted << "\" in the \"" << key
+          << "\" variable does not exist.\n";
+      converted = "";
+    }
+  } catch ( Poco::FileException & )
   {
     g_log.warning() << "Required properties path \"" << converted << "\" in the \"" << key
         << "\" variable does not exist.\n";
     converted = "";
   }
+  
   // Backward slashes cannot be allowed to go into our properties file
   // Note this is a temporary fix for ticket #2445. 
   // Ticket #2460 prompts a review of our path handling in the config service.
-- 
GitLab