Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Instrument Control
NomadCommandSystem
Commits
622868a7
Commit
622868a7
authored
May 19, 2020
by
Locatelli
Browse files
Correct bug
VirtualHome was setting after properties reading
parent
7e0a4abb
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/fr/ill/ics/util/ConfigManager.java
View file @
622868a7
...
...
@@ -121,7 +121,7 @@ public class ConfigManager {
private
boolean
mainClient
=
true
;
private
String
clientType
;
private
String
localFilesDirectory
=
DEFAULT_LOCAL_FILES_DIRECTORY
;
private
static
String
localFilesDirectory
=
DEFAULT_LOCAL_FILES_DIRECTORY
;
/**
* @return the unique instance of this class
...
...
@@ -140,9 +140,10 @@ public class ConfigManager {
}
public
static
void
initInstance
()
{
public
static
void
initInstance
(
String
virtualHomeValue
)
{
if
(
instance
==
null
)
{
instance
=
new
ConfigManager
();
setLocalFilesDirectory
(
virtualHomeValue
);
instance
.
init
();
}
}
...
...
@@ -640,12 +641,14 @@ public class ConfigManager {
return
localFilesDirectory
;
}
public
void
setLocalFilesDirectory
(
String
localFilesDirectory
)
{
if
(!
new
File
(
localFilesDirectory
).
exists
())
{
// Directory does not exist: create it
File
file
=
new
File
(
localFilesDirectory
);
file
.
mkdir
();
private
static
void
setLocalFilesDirectory
(
String
tmp
)
{
if
(
tmp
.
isEmpty
()
==
false
)
{
if
(!
new
File
(
tmp
).
exists
())
{
// Directory does not exist: create it
File
file
=
new
File
(
tmp
);
file
.
mkdir
();
}
localFilesDirectory
=
tmp
;
}
this
.
localFilesDirectory
=
localFilesDirectory
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment