File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
src/main/java/io/github/dsheirer/properties Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
2
* *****************************************************************************
3
- * Copyright (C) 2014-2023 Dennis Sheirer
3
+ * Copyright (C) 2014-2024 Dennis Sheirer
4
4
*
5
5
* This program is free software: you can redistribute it and/or modify
6
6
* it under the terms of the GNU General Public License as published by
@@ -125,14 +125,26 @@ public Path getApplicationRootPath()
125
125
126
126
if (root .equalsIgnoreCase (DEFAULT_APP_ROOT ))
127
127
{
128
- retVal = Paths .get (
129
- System .getProperty ("user.home" ), DEFAULT_APP_ROOT );
128
+ retVal = Paths .get (System .getProperty ("user.home" ), DEFAULT_APP_ROOT );
130
129
}
131
130
else
132
131
{
133
132
retVal = Paths .get (root );
134
133
}
135
134
135
+ if (!Files .exists (retVal ))
136
+ {
137
+ try
138
+ {
139
+ mLog .info ("Creating application root folder: " + retVal );
140
+ Files .createDirectory (retVal );
141
+ }
142
+ catch (IOException e )
143
+ {
144
+ mLog .error ("Error creating sdrtrunk application root folder" , e );
145
+ }
146
+ }
147
+
136
148
return retVal ;
137
149
}
138
150
You can’t perform that action at this time.
0 commit comments