Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
6472571d
Commit
6472571d
authored
9 years ago
by
Nick Draper
Browse files
Options
Downloads
Patches
Plain Diff
Catch potential errors on startup of Mantid
if .mantid or %appdata% directory permissions do not allow writing re #14404
parent
8be5b3fa
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Framework/Kernel/src/ConfigService.cpp
+20
-3
20 additions, 3 deletions
Framework/Kernel/src/ConfigService.cpp
with
20 additions
and
3 deletions
Framework/Kernel/src/ConfigService.cpp
+
20
−
3
View file @
6472571d
...
...
@@ -255,10 +255,27 @@ ConfigServiceImpl::ConfigServiceImpl()
Poco
::
Path
path
(
appDataDir
);
path
.
pushDirectory
(
"instrument"
);
Poco
::
File
file
(
path
);
// createdirectories will fail gracefully if it is already present
file
.
createDirectories
();
// createDirectories will fail gracefully if it is already present - but will
// throw an error if it cannot create the directory
try
{
file
.
createDirectories
();
}
catch
(
Poco
::
FileException
&
fe
)
{
g_log
.
error
()
<<
"Cannot create the local instrument cache directory ["
<<
path
.
toString
()
<<
"]. Mantid will not be able to update instrument definitions.
\n
"
<<
fe
.
what
()
<<
std
::
endl
;
}
Poco
::
File
vtpDir
(
getVTPFileDirectory
());
vtpDir
.
createDirectories
();
try
{
vtpDir
.
createDirectories
();
}
catch
(
Poco
::
FileException
&
fe
)
{
g_log
.
error
()
<<
"Cannot create the local instrument geometry cache directory ["
<<
path
.
toString
()
<<
"]. Mantid will be slower at viewing complex instruments.
\n
"
<<
fe
.
what
()
<<
std
::
endl
;
}
// must update the cache of instrument paths
cacheInstrumentPaths
();
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment