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
46d73c29
Commit
46d73c29
authored
8 years ago
by
Peterson, Peter
Browse files
Options
Downloads
Patches
Plain Diff
Documented unnoticed side-effect
parent
bf1a5a82
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
+8
-7
8 additions, 7 deletions
Framework/Kernel/src/ConfigService.cpp
with
8 additions
and
7 deletions
Framework/Kernel/src/ConfigService.cpp
+
8
−
7
View file @
46d73c29
...
...
@@ -1627,7 +1627,8 @@ const std::string ConfigServiceImpl::getVTPFileDirectory() {
return
directoryName
;
}
/**
* Fills the internal cache of instrument definition directories
* Fills the internal cache of instrument definition directories and creates
* The %appdata%/mantidproject/mantid or $home/.mantid directory.
*
* This will normally contain from Index 0
* - The download directory (win %appdata%/mantidproject/mantid/instrument)
...
...
@@ -1638,21 +1639,21 @@ const std::string ConfigServiceImpl::getVTPFileDirectory() {
void
ConfigServiceImpl
::
cacheInstrumentPaths
()
{
m_InstrumentDirs
.
clear
();
Poco
::
Path
path
(
getAppDataDir
());
path
.
makeDirectory
();
// making this directory is a necessary side effect
path
.
pushDirectory
(
"instrument"
);
// only use downloaded instruments if configured to download
const
std
::
string
updateInstrStr
=
this
->
getString
(
"UpdateInstrumentDefinitions.OnStartup"
);
if
(
updateInstrStr
.
compare
(
"1"
)
==
0
||
updateInstrStr
.
compare
(
"on"
)
==
0
||
updateInstrStr
.
compare
(
"On"
)
==
0
)
{
Poco
::
Path
path
(
getAppDataDir
());
path
.
makeDirectory
();
path
.
pushDirectory
(
"instrument"
);
std
::
string
appdatadir
=
path
.
toString
();
const
std
::
string
appdatadir
=
path
.
toString
();
addDirectoryifExists
(
appdatadir
,
m_InstrumentDirs
);
}
#ifndef _WIN32
std
::
string
etcdatadir
=
"/etc/mantid/instrument"
;
addDirectoryifExists
(
etcdatadir
,
m_InstrumentDirs
);
addDirectoryifExists
(
"/etc/mantid/instrument"
,
m_InstrumentDirs
);
#endif
// Determine the search directory for XML instrument definition files (IDFs)
...
...
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