Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Commit

Permalink
Changed the Output-Directory clearing to false by default
Browse files Browse the repository at this point in the history
Warn the User if changing the Output directory and clearing is enabled
  • Loading branch information
Petschko committed Dec 7, 2017
1 parent 33a225b commit 61af7fa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/org/petschko/rpgmakermv/decrypt/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
class Config {
// Program Info
static final String version = "v0.1.3 Alpha";
static final String version = "v0.1.3.1 (Hotfix) Alpha";
static final String programName = "RPG-Maker MV Decrypter";
static final String projectPageURL = "https://github.com/Petschko/Java-RPG-Maker-MV-Decrypter";
static final String projectBugReportURL = "https://github.com/Petschko/Java-RPG-Maker-MV-Decrypter/issues";
Expand Down
4 changes: 4 additions & 0 deletions src/org/petschko/rpgmakermv/decrypt/GUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ private void assignMainMenuListener() {
);
this.mainMenu.changeOutputDir.addActionListener(
e -> {
// Warn the user that the selected directory will be cleared
if(Boolean.parseBoolean(App.preferences.getConfig(Preferences.clearOutputDirBeforeDecrypt, "true")))
new InfoWindow("You have chosen, that the selected Directory will be cleared.\nBeware that this Program clear the selected Directory (Deletes all Files within)! Don't select directories where you have important Files or Sub-Directories in!\n\n(Or turn off the clearing under Options)", "Important Info about your Files").show(this.mainWindow);

String openDir = App.preferences.getConfig(Preferences.lastOutputParentDir, ".");

if(! File.existsDir(openDir))
Expand Down
2 changes: 1 addition & 1 deletion src/org/petschko/rpgmakermv/decrypt/Preferences.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public boolean loadDefaults() {
p.setProperty(Preferences.ignoreFakeHeader, "true");
p.setProperty(Preferences.overwriteFiles, "false");
p.setProperty(Preferences.loadInvalidRPGDirs, "false");
p.setProperty(Preferences.clearOutputDirBeforeDecrypt, "true");
p.setProperty(Preferences.clearOutputDirBeforeDecrypt, "false");
p.setProperty(Preferences.lastOutputDir, Config.defaultOutputDir);
p.setProperty(Preferences.lastOutputParentDir, ".");
p.setProperty(Preferences.lastRPGDir, ".");
Expand Down

0 comments on commit 61af7fa

Please sign in to comment.