Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1960 Application Root Directory Not Found On Fresh Install #1961

Merged
merged 1 commit into from
Aug 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions src/main/java/io/github/dsheirer/properties/SystemProperties.java
Original file line number Diff line number Diff line change
@@ -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
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -125,14 +125,26 @@ public Path getApplicationRootPath()

if(root.equalsIgnoreCase(DEFAULT_APP_ROOT))
{
retVal = Paths.get(
System.getProperty("user.home"), DEFAULT_APP_ROOT);
retVal = Paths.get(System.getProperty("user.home"), DEFAULT_APP_ROOT);
}
else
{
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;
}

Expand Down
Loading