All Linebreaks to LF.

This commit is contained in:
Ottermandias 2021-02-15 12:55:04 +01:00
parent 82dff6be25
commit de8930c574
32 changed files with 1356 additions and 1356 deletions

View file

@ -55,9 +55,9 @@ namespace Penumbra.Importer
case ".ttmp":
case ".ttmp2":
VerifyVersionAndImport(modPackFile);
break;
default:
break;
default:
throw new ArgumentException( $"Unrecognized modpack format: {modPackFile.Extension}", nameof(modPackFile) );
}
@ -100,7 +100,7 @@ namespace Penumbra.Importer
ImportV2ModPack(modPackFile, extractedModPack, modRaw);
}
else
{
{
if (modPackFile.Extension != ".ttmp")
PluginLog.Warning($"File {modPackFile.FullName} seems to be a V1 TTMP, but has the wrong extension.");
ImportV1ModPack(modPackFile, extractedModPack, modRaw);
@ -223,11 +223,11 @@ namespace Penumbra.Importer
// Iterate through all pages
foreach( var page in modList.ModPackPages)
{
foreach(var group in page.ModGroups)
{
foreach(var group in page.ModGroups)
{
var groupFolder = new DirectoryInfo(Path.Combine(newModFolder.FullName, group.GroupName.ReplaceInvalidPathSymbols()));
foreach(var option in group.OptionList)
{
foreach(var option in group.OptionList)
{
var optionFolder = new DirectoryInfo( Path.Combine( groupFolder.FullName, option.Name.ReplaceInvalidPathSymbols()) );
ExtractSimpleModList( optionFolder, option.ModsJsons, modData );
}
@ -249,7 +249,7 @@ namespace Penumbra.Importer
GroupName = group.GroupName,
Options = new List<Option>(),
};
foreach( var opt in group.OptionList )
foreach( var opt in group.OptionList )
{
var optio = new Option
{
@ -258,13 +258,13 @@ namespace Penumbra.Importer
OptionFiles = new Dictionary<string, HashSet<string>>()
};
var optDir = new DirectoryInfo(Path.Combine( groupFolder.FullName, opt.Name.ReplaceInvalidPathSymbols()));
if (optDir.Exists)
if (optDir.Exists)
{
foreach ( var file in optDir.EnumerateFiles("*.*", SearchOption.AllDirectories) )
foreach ( var file in optDir.EnumerateFiles("*.*", SearchOption.AllDirectories) )
{
optio.AddFile(file.FullName.Substring(baseFolder.FullName.Length).TrimStart('\\'), file.FullName.Substring(optDir.FullName.Length).TrimStart('\\').Replace('\\','/'));
}
}
}
}
Inf.Options.Add( optio );
}
meta.Groups.Add( group.GroupName, Inf );