fix: All folders are created correctly at startup if missing
To create a clean empty instance of the manager just copy the folders "jre" and "vice" and PCUAEManager.exe to a new folder.
This commit is contained in:
parent
23e325475a
commit
64c919cabc
|
@ -45,6 +45,21 @@ public class PCUAEManager
|
||||||
{
|
{
|
||||||
ExceptionHandler.handleException(e, "Startup failure");
|
ExceptionHandler.handleException(e, "Startup failure");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Make sure all folders are available
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Files.createDirectories(Paths.get("./screens/"));
|
||||||
|
Files.createDirectories(Paths.get("./covers/"));
|
||||||
|
Files.createDirectories(Paths.get("./games/"));
|
||||||
|
Files.createDirectories(Paths.get("./saves/"));
|
||||||
|
Files.createDirectories(Paths.get("./pcuae-install/"));
|
||||||
|
Files.createDirectories(Paths.get("./extradisks/"));
|
||||||
|
}
|
||||||
|
catch (IOException e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
SwingUtilities.invokeLater(() -> {
|
SwingUtilities.invokeLater(() -> {
|
||||||
|
|
||||||
|
@ -60,23 +75,6 @@ public class PCUAEManager
|
||||||
mainWindow.initialize();
|
mainWindow.initialize();
|
||||||
mainWindow.setVisible(true);
|
mainWindow.setVisible(true);
|
||||||
|
|
||||||
//Make sure all folders are available
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Files.createDirectories(Paths.get("./screens/"));
|
|
||||||
Files.createDirectories(Paths.get("./covers/"));
|
|
||||||
Files.createDirectories(Paths.get("./games/"));
|
|
||||||
Files.createDirectories(Paths.get("./saves/"));
|
|
||||||
Files.createDirectories(Paths.get("./pcuae-install/"));
|
|
||||||
Files.createDirectories(Paths.get("./extradisks/"));
|
|
||||||
}
|
|
||||||
catch (IOException e)
|
|
||||||
{
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Check for new versions at startup, but only when running stand-alone, not during development.
|
//Check for new versions at startup, but only when running stand-alone, not during development.
|
||||||
if (!FileManager.getPcuVersionFromManifest().isEmpty())
|
if (!FileManager.getPcuVersionFromManifest().isEmpty())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue