mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-14 17:47:32 -05:00
Co-authored-by: Dennis Sheirer <dsheirer@github.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* *****************************************************************************
|
* *****************************************************************************
|
||||||
* Copyright (C) 2014-2023 Dennis Sheirer
|
* Copyright (C) 2014-2024 Dennis Sheirer
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -125,14 +125,26 @@ public class SystemProperties
|
|||||||
|
|
||||||
if(root.equalsIgnoreCase(DEFAULT_APP_ROOT))
|
if(root.equalsIgnoreCase(DEFAULT_APP_ROOT))
|
||||||
{
|
{
|
||||||
retVal = Paths.get(
|
retVal = Paths.get(System.getProperty("user.home"), DEFAULT_APP_ROOT);
|
||||||
System.getProperty("user.home"), DEFAULT_APP_ROOT);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
retVal = Paths.get(root);
|
retVal = Paths.get(root);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!Files.exists(retVal))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
mLog.info("Creating application root folder: " + retVal);
|
||||||
|
Files.createDirectory(retVal);
|
||||||
|
}
|
||||||
|
catch(IOException e)
|
||||||
|
{
|
||||||
|
mLog.error("Error creating sdrtrunk application root folder", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user