mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Fixed mod import crashing before creating the meta file when options are empty and thus folders are not created.
This commit is contained in:
parent
b987fe53cb
commit
ec915368b3
1 changed files with 6 additions and 3 deletions
|
|
@ -246,9 +246,12 @@ namespace Penumbra.Importer
|
||||||
OptionFiles = new Dictionary<string, HashSet<string>>()
|
OptionFiles = new Dictionary<string, HashSet<string>>()
|
||||||
};
|
};
|
||||||
var optDir = new DirectoryInfo(Path.Combine( groupFolder.FullName, opt.Name));
|
var optDir = new DirectoryInfo(Path.Combine( groupFolder.FullName, opt.Name));
|
||||||
foreach ( var file in optDir.EnumerateFiles("*.*", SearchOption.AllDirectories) )
|
if (optDir.Exists)
|
||||||
{
|
{
|
||||||
optio.AddFile(file.FullName.Substring(baseFolder.FullName.Length).TrimStart('\\'), file.FullName.Substring(optDir.FullName.Length).TrimStart('\\').Replace('\\','/'));
|
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 );
|
Inf.Options.Add( optio );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue