diff --git a/src/main/java/se/lantz/gui/MenuManager.java b/src/main/java/se/lantz/gui/MenuManager.java index 846bca0..5cb3b42 100644 --- a/src/main/java/se/lantz/gui/MenuManager.java +++ b/src/main/java/se/lantz/gui/MenuManager.java @@ -954,8 +954,8 @@ public class MenuManager if (!viewList.isEmpty()) { exportManager.setGameViewsToExport(viewList); - exportManager.setTargetDirectory(exportSelectionDialog.getTargetDirectory(), - exportSelectionDialog.deleteBeforeExport()); + exportManager.setDeleteBeforeExport(exportSelectionDialog.deleteBeforeExport()); + exportManager.setTargetDirectory(exportSelectionDialog.getTargetDirectory()); ImportExportProgressDialog dialog = new ImportExportProgressDialog(this.mainWindow, "Export games", false); ExportWorker worker = new ExportWorker(exportManager, dialog); worker.execute(); @@ -968,8 +968,8 @@ public class MenuManager if (!gamesList.isEmpty()) { exportManager.setGamesToExport(gamesList); - exportManager.setTargetDirectory(exportSelectionDialog.getTargetDirectory(), - exportSelectionDialog.deleteBeforeExport()); + exportManager.setDeleteBeforeExport(exportSelectionDialog.deleteBeforeExport()); + exportManager.setTargetDirectory(exportSelectionDialog.getTargetDirectory()); ImportExportProgressDialog dialog = new ImportExportProgressDialog(this.mainWindow, "Export games", false); ExportWorker worker = new ExportWorker(exportManager, dialog); worker.execute(); @@ -992,8 +992,8 @@ public class MenuManager if (!viewList.isEmpty()) { exportManager.setGameViewsToExport(viewList); - exportManager.setTargetDirectory(exportSelectionDialog.getTargetDirectory(), - exportSelectionDialog.deleteBeforeExport()); + exportManager.setDeleteBeforeExport(exportSelectionDialog.deleteBeforeExport()); + exportManager.setTargetDirectory(exportSelectionDialog.getTargetDirectory()); ImportExportProgressDialog dialog = new ImportExportProgressDialog(this.mainWindow, "Export games", false); ExportFileLoaderWorker worker = new ExportFileLoaderWorker(exportManager, dialog); worker.execute(); @@ -1006,8 +1006,8 @@ public class MenuManager if (!gamesList.isEmpty()) { exportManager.setGamesToExport(gamesList); - exportManager.setTargetDirectory(exportSelectionDialog.getTargetDirectory(), - exportSelectionDialog.deleteBeforeExport()); + exportManager.setDeleteBeforeExport(exportSelectionDialog.deleteBeforeExport()); + exportManager.setTargetDirectory(exportSelectionDialog.getTargetDirectory()); ImportExportProgressDialog dialog = new ImportExportProgressDialog(this.mainWindow, "Export games", false); ExportFileLoaderWorker worker = new ExportFileLoaderWorker(exportManager, dialog); worker.execute(); diff --git a/src/main/java/se/lantz/gui/exports/ExportFileLoaderWorker.java b/src/main/java/se/lantz/gui/exports/ExportFileLoaderWorker.java index b209057..7e19148 100644 --- a/src/main/java/se/lantz/gui/exports/ExportFileLoaderWorker.java +++ b/src/main/java/se/lantz/gui/exports/ExportFileLoaderWorker.java @@ -24,8 +24,10 @@ public class ExportFileLoaderWorker extends SwingWorker { if (exportManager.isDeleteBeforeExport()) { - publish("Deleting existing games before exporting.\n"); + publish("Deleting existing games before exporting...\n"); + exportManager.deleteBeforeExport(); } + exportManager.createDirectoriesBeforeExport(); publish("Exporting from db..."); StringBuilder infoBuilder = new StringBuilder(); exportManager.readFromDb(infoBuilder); @@ -34,7 +36,7 @@ public class ExportFileLoaderWorker extends SwingWorker infoBuilder = new StringBuilder(); exportManager.createGameInfoFiles(infoBuilder, true); publish(infoBuilder.toString()); - publish("Copy game files..."); + publish("Copying game files..."); infoBuilder = new StringBuilder(); exportManager.copyGamesForFileLoader(infoBuilder); publish(infoBuilder.toString()); diff --git a/src/main/java/se/lantz/gui/exports/ExportWorker.java b/src/main/java/se/lantz/gui/exports/ExportWorker.java index eef18a8..abb2123 100644 --- a/src/main/java/se/lantz/gui/exports/ExportWorker.java +++ b/src/main/java/se/lantz/gui/exports/ExportWorker.java @@ -24,8 +24,10 @@ public class ExportWorker extends SwingWorker { if (exportManager.isDeleteBeforeExport()) { - publish("Deleting existing games before exporting.\n"); + publish("Deleting existing games before exporting...\n"); + exportManager.deleteBeforeExport(); } + exportManager.createDirectoriesBeforeExport(); publish("Exporting from db..."); StringBuilder infoBuilder = new StringBuilder(); exportManager.readFromDb(infoBuilder); @@ -34,7 +36,7 @@ public class ExportWorker extends SwingWorker infoBuilder = new StringBuilder(); exportManager.createGameInfoFiles(infoBuilder, false); publish(infoBuilder.toString()); - publish("Copy screenshots, covers and game files..."); + publish("Copying screenshots, covers and game files..."); infoBuilder = new StringBuilder(); exportManager.copyFilesForCarousel(infoBuilder); publish(infoBuilder.toString());