Skip to content

Commit

Permalink
fix: change properties file save directory to make it permanent (#136)
Browse files Browse the repository at this point in the history
.properties file will be saved in `%userprofile%/.mctimemachine` directory after this.
  • Loading branch information
hizumiaoba authored Oct 26, 2024
1 parent d9a17bf commit cfc7e2d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,10 @@ public class MainController {

@FXML
void initialize() {
mainConfig = ApplicationConfig.getInstance("application.properties");
String confPath = System.getProperty("user.home")
+ File.separator + ".mctimemachine" + File.separator
+ "application.properties";
mainConfig = ApplicationConfig.getInstance(confPath);
Runtime.getRuntime().addShutdownHook(internalControllerThreadFactory.newThread(() -> {
log.info("saving configurations.");
mainConfig.set("saves_folder_path", savesFolderPathField.getText());
Expand Down

0 comments on commit cfc7e2d

Please sign in to comment.