Skip to content

Commit

Permalink
Print additional rename warning at the end
Browse files Browse the repository at this point in the history
  • Loading branch information
sk-zk committed Oct 28, 2024
1 parent 5f21eca commit 76f4873
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions Extractor/HashFsExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ public override void PrintExtractionResult()
{
Console.WriteLine($"{extracted} extracted, {renamed} renamed, {skipped} skipped, " +
$"{notFound} not found, {failed} failed");
PrintRenameSummary(renamed);
}

public override void Dispose()
Expand Down
9 changes: 9 additions & 0 deletions Extractor/Util.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,15 @@ public static void PrintRenameWarning(string original, string renamed)
$"{ReplaceControlChars(renamed)}");
}

public static void PrintRenameSummary(int renamed)
{
if (renamed > 0)
{
Console.WriteLine($"WARN: {renamed} file{(renamed == 1 ? " was" : "s were")} renamed. " +
$"Make sure to update references to affected paths accordingly.");
}
}

public static IEnumerable<string> GetAllScsFiles(string directory)
=> Directory.EnumerateFiles(directory, "*.scs");
}
Expand Down
1 change: 1 addition & 0 deletions Extractor/ZipExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ public override void PrintExtractionResult()
{
Console.WriteLine($"{extracted} extracted, {renamed} renamed, {skipped} skipped, " +
$"{empty} empty, {failed} failed");
PrintRenameSummary(renamed);
}

/// <summary>
Expand Down

0 comments on commit 76f4873

Please sign in to comment.