mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 20:43:07 +00:00
Fix backup filenaming
This commit is contained in:
parent
699a598227
commit
f785231692
1 changed files with 4 additions and 2 deletions
|
@ -30,10 +30,12 @@ namespace PKHeX.Core
|
||||||
private byte[] Footer = Array.Empty<byte>(); // .dsv
|
private byte[] Footer = Array.Empty<byte>(); // .dsv
|
||||||
private byte[] Header = Array.Empty<byte>(); // .gci
|
private byte[] Header = Array.Empty<byte>(); // .gci
|
||||||
|
|
||||||
|
private string BAKSuffix => $" [{SAV.ShortSummary}].bak";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Simple summary of the save file, to help differentiate it from other save files with the same filename.
|
/// Simple summary of the save file, to help differentiate it from other save files with the same filename.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string BAKName => $"{FileName} [{SAV.ShortSummary}].bak";
|
public string BAKName => FileName + BAKSuffix;
|
||||||
|
|
||||||
public SaveFileMetadata(SaveFile sav) => SAV = sav;
|
public SaveFileMetadata(SaveFile sav) => SAV = sav;
|
||||||
|
|
||||||
|
@ -89,7 +91,7 @@ namespace PKHeX.Core
|
||||||
{
|
{
|
||||||
FilePath = path;
|
FilePath = path;
|
||||||
FileFolder = Path.GetDirectoryName(path);
|
FileFolder = Path.GetDirectoryName(path);
|
||||||
FileName = GetFileName(path, BAKName);
|
FileName = GetFileName(path, BAKSuffix);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string? GetFileName(string path, string bak)
|
private static string? GetFileName(string path, string bak)
|
||||||
|
|
Loading…
Reference in a new issue