File tree Expand file tree Collapse file tree 3 files changed +2
-7
lines changed Expand file tree Collapse file tree 3 files changed +2
-7
lines changed Original file line number Diff line number Diff line change 77namespace Hypermc . Settings
88{
99 public class ApplicationSettings
10- {
11- public AppSettings AppSettings { get ; set ; }
12- }
13-
14- public class AppSettings
1510 {
1611 public string AppPath { get ; set ; }
1712 public string DeafultMinecraftPath { get ; set ; }
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ public class UserSettings : IUserSettings
2323
2424 public UserSettings ( IFileManager fileManager , IConfiguration config )
2525 {
26- var settings = config . Get < ApplicationSettings > ( ) . AppSettings ;
26+ var settings = config . GetSection ( nameof ( ApplicationSettings ) ) . Get < ApplicationSettings > ( ) ;
2727 _appPath = string . Format ( settings . AppPath , Environment . GetFolderPath ( Environment . SpecialFolder . ApplicationData ) ) ;
2828 _settingsFile = string . Format ( settings . SettingsFile , _appPath ) ;
2929
Original file line number Diff line number Diff line change 11{
2- "AppSettings " : {
2+ "ApplicationSettings " : {
33 "AppPath" : " {0}\\ .hypermc" ,
44 "DeafultMinecraftPath" : " {0}\\ .minecraft" ,
55 "DefaultModPacksPath" : " {0}\\ ModPacks" ,
You can’t perform that action at this time.
0 commit comments