@@ -90,7 +90,7 @@ public static FileItemObj MakeDownloadObj(this CurseForgeModObj.CurseForgeDataOb
9090 {
9191 Url = data . DownloadUrl ,
9292 Name = data . DisplayName ,
93- Local = Path . Combine ( obj . GetGamePath ( ) , info . File , data . FileName ) ,
93+ Local = Path . Combine ( obj . GetGamePath ( ) , info . FilePath , data . FileName ) ,
9494 Sha1 = data . Hashes . Where ( a => a . Algo == 1 )
9595 . Select ( a => a . Value ) . FirstOrDefault ( )
9696 } ;
@@ -331,7 +331,7 @@ public static async Task<ItemPathRes> GetItemPathAsync(this GameSettingObj game,
331331 {
332332 var item1 = new ItemPathRes ( )
333333 {
334- File = game . GetModsPath ( ) ,
334+ FilePath = game . GetModsPath ( ) ,
335335 Path = Names . NameGameModDir ,
336336 FileType = FileType . Mod
337337 } ;
@@ -347,24 +347,31 @@ public static async Task<ItemPathRes> GetItemPathAsync(this GameSettingObj game,
347347 if ( info1 . Data . Categories . Any ( item => item . ClassId == CurseForgeAPI . ClassResourcepack )
348348 || info1 . Data . ClassId == CurseForgeAPI . ClassResourcepack )
349349 {
350- item1 . File = game . GetResourcepacksPath ( ) ;
350+ item1 . FilePath = game . GetResourcepacksPath ( ) ;
351351 item1 . Path = Names . NameGameResourcepackDir ;
352352 item1 . FileType = FileType . Resourcepack ;
353353 }
354354 else if ( info1 . Data . Categories . Any ( item => item . ClassId == CurseForgeAPI . ClassShaderpack )
355355 || info1 . Data . ClassId == CurseForgeAPI . ClassShaderpack )
356356 {
357- item1 . File = game . GetShaderpacksPath ( ) ;
357+ item1 . FilePath = game . GetShaderpacksPath ( ) ;
358358 item1 . Path = Names . NameGameShaderpackDir ;
359359 item1 . FileType = FileType . Shaderpack ;
360360 }
361361 else if ( info1 . Data . Categories . Any ( item => item . ClassId == CurseForgeAPI . ClassWorld )
362362 || info1 . Data . ClassId == CurseForgeAPI . ClassWorld )
363363 {
364- item1 . File = game . GetSavesPath ( ) ;
364+ item1 . FilePath = game . GetSavesPath ( ) ;
365365 item1 . Path = Names . NameGameSavesDir ;
366366 item1 . FileType = FileType . Save ;
367367 }
368+ else if ( info1 . Data . Categories . Any ( item => item . ClassId == CurseForgeAPI . ClassOpenLoaderDataPack )
369+ || info1 . Data . ClassId == CurseForgeAPI . ClassOpenLoaderDataPack )
370+ {
371+ item1 . FilePath = Path . Combine ( game . GetConfigPath ( ) , Names . NameOpenLoaderDir , Names . NameDataDir ) ;
372+ item1 . Path = $ "{ Names . NameGameConfigDir } /{ Names . NameOpenLoaderDir } /{ Names . NameDataDir } ";
373+ item1 . FileType = FileType . OpenLoaderDataPack ;
374+ }
368375 }
369376
370377 return item1 ;
0 commit comments