Skip to content

Commit

Permalink
Fix extraction of pmp failing
Browse files Browse the repository at this point in the history
  • Loading branch information
Ottermandias committed Jul 9, 2024
1 parent c251749 commit 3c417d7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Penumbra/Services/MigrationManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,13 @@ public void MigrateMdlDuringExtraction(IReader reader, string directory, Extract
{
var data = s.ToArray();
var mdl = new MdlFile(data);
Directory.CreateDirectory(Path.GetDirectoryName(path)!);
MigrateModel(path, mdl, false);
Penumbra.Log.Debug($"Migrated model {reader.Entry.Key} from V5 to V6 during import.");
}
else
{
Directory.CreateDirectory(Path.GetDirectoryName(path)!);
using var f = File.Open(path, FileMode.Create, FileAccess.Write);
s.Seek(0, SeekOrigin.Begin);
s.WriteTo(f);
Expand All @@ -279,6 +281,7 @@ public void MigrateMtrlDuringExtraction(IReader reader, string directory, Extrac
Penumbra.Log.Debug($"Migrated material {reader.Entry.Key} to Dawntrail during import.");
}

Directory.CreateDirectory(Path.GetDirectoryName(path)!);
using var f = File.Open(path, FileMode.Create, FileAccess.Write);
s.Seek(0, SeekOrigin.Begin);
s.WriteTo(f);
Expand Down

0 comments on commit 3c417d7

Please sign in to comment.