mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Remove .NET Framework 4.6.2/4.7.2 (#24)
* Remove < .NET 4.8, general cleanup * Abstract * Tango * Banner * Scan no more * Common * Application * Access * Filter-feeder * Graffiti * Paint-over * Law and Order * XOR-o * Unused staircase * Maybe * Maybe not * Delete this * The word is "no" * Emit * Improper * Aye aye * Fence * Barrier * Monkey * Pail * Lines
This commit is contained in:
@@ -46,8 +46,6 @@ namespace SabreTools.Library.Skippers
|
||||
/// <returns>True if the file was transformed properly, false otherwise</returns>
|
||||
public bool TransformFile(string input, string output)
|
||||
{
|
||||
bool success = true;
|
||||
|
||||
// If the input file doesn't exist, fail
|
||||
if (!File.Exists(input))
|
||||
{
|
||||
@@ -56,15 +54,15 @@ namespace SabreTools.Library.Skippers
|
||||
}
|
||||
|
||||
// Create the output directory if it doesn't already
|
||||
Utilities.EnsureOutputDirectory(Path.GetDirectoryName(output));
|
||||
DirectoryExtensions.Ensure(Path.GetDirectoryName(output));
|
||||
|
||||
Globals.Logger.User($"Attempting to apply rule to '{input}'");
|
||||
success = TransformStream(Utilities.TryOpenRead(input), Utilities.TryCreate(output));
|
||||
bool success = TransformStream(FileExtensions.TryOpenRead(input), FileExtensions.TryCreate(output));
|
||||
|
||||
// If the output file has size 0, delete it
|
||||
if (new FileInfo(output).Length == 0)
|
||||
{
|
||||
Utilities.TryDeleteFile(output);
|
||||
FileExtensions.TryDelete(output);
|
||||
success = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user