File tree Expand file tree Collapse file tree
Desktop/ModuleManager/Implementation Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,15 +20,15 @@ public ModuleInstanceManager(
2020 _loggerFactory = loggerFactory ;
2121
2222 OpenShock = new OpenShockService ( serviceProvider ) ;
23+
24+ ModuleDataDirectory = Path . Combine ( Constants . ModuleData , _loadedModule . Id ) ;
25+
26+ if ( ! Directory . Exists ( ModuleDataDirectory ) ) Directory . CreateDirectory ( ModuleDataDirectory ) ;
2327 }
2428
2529 public async Task < IModuleConfig < T > > GetModuleConfig < T > ( ) where T : new ( )
2630 {
27- var moduleConfigPath = Path . Combine ( Constants . ModuleData , _loadedModule . Id ) ;
28-
29- if ( ! Directory . Exists ( moduleConfigPath ) ) Directory . CreateDirectory ( moduleConfigPath ) ;
30-
31- var moduleConfigFile = Path . Combine ( moduleConfigPath , "config.json" ) ;
31+ var moduleConfigFile = Path . Combine ( ModuleDataDirectory , "config.json" ) ;
3232
3333 return await ModuleConfig < T > . Create ( moduleConfigFile ,
3434 _loggerFactory . CreateLogger ( "ModuleConfig+" + _loadedModule . Id ) ) ;
@@ -37,4 +37,6 @@ public ModuleInstanceManager(
3737 public required IServiceProvider AppServiceProvider { get ; init ; }
3838
3939 public IOpenShockService OpenShock { get ; }
40+
41+ public string ModuleDataDirectory { get ; init ; }
4042}
Original file line number Diff line number Diff line change 22 <PropertyGroup >
33 <Company >OpenShock</Company >
44 <Product >$(Company).$(MSBuildProjectName)</Product >
5- <Version >1.1.4 </Version >
6- <AssemblyVersion >1.1.4 .0</AssemblyVersion >
5+ <Version >1.1.5 </Version >
6+ <AssemblyVersion >1.1.5 .0</AssemblyVersion >
77 <FileVersion >$(AssemblyVersion)</FileVersion >
88 <Authors >OpenShock</Authors >
99
Original file line number Diff line number Diff line change @@ -8,4 +8,6 @@ public interface IModuleInstanceManager
88 public IServiceProvider AppServiceProvider { get ; }
99
1010 public IOpenShockService OpenShock { get ; }
11+
12+ public string ModuleDataDirectory { get ; }
1113}
You can’t perform that action at this time.
0 commit comments