mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-23 08:17:59 +01:00
cleanup some garbage, make loading less brittle
This commit is contained in:
parent
729ef7fea7
commit
00af098d66
4 changed files with 129 additions and 113 deletions
|
|
@ -54,13 +54,13 @@ namespace Penumbra.Importer
|
|||
{
|
||||
case ".ttmp":
|
||||
ImportV1ModPack( modPackFile );
|
||||
return;
|
||||
break;
|
||||
|
||||
case ".ttmp2":
|
||||
ImportV2ModPack( modPackFile );
|
||||
return;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new ArgumentException( $"Unrecognized modpack format: {modPackFile.Extension}", nameof(modPackFile) );
|
||||
}
|
||||
|
||||
|
|
@ -249,13 +249,13 @@ namespace Penumbra.Importer
|
|||
OptionFiles = new Dictionary<string, HashSet<string>>()
|
||||
};
|
||||
var optDir = new DirectoryInfo(Path.Combine( groupFolder.FullName, opt.Name));
|
||||
if (optDir.Exists)
|
||||
if (optDir.Exists)
|
||||
{
|
||||
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 );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue