Set metadata for sav on certain paths

Closes #3282
This commit is contained in:
Kurt 2021-11-07 10:17:03 -08:00
parent f23490f02a
commit 692898fe46
2 changed files with 11 additions and 1 deletions

View file

@ -27,11 +27,18 @@ namespace PKHeX.Core
{
var other = FileUtil.GetSupportedFile(path, SAV);
if (other is SaveFile s)
{
s.Metadata.SetExtraInfo(path);
SAV = s;
}
else if (other is PKM pkm)
{
Entity = pkm;
}
else if (other is not null)
{
Extra.Add(other);
}
}
}

View file

@ -545,7 +545,10 @@ namespace PKHeX.Core
if (sav == null)
continue;
sav.Metadata.SetExtraInfo(split.Header, split.Footer);
var meta = sav.Metadata;
meta.SetExtraInfo(split.Header, split.Footer);
if (path is not null)
meta.SetExtraInfo(path);
return sav;
}
#endif