mirror of
https://github.com/SabreTools/MPF.git
synced 2026-07-02 17:24:48 +00:00
Fix newline processing, add changelog
This commit is contained in:
@@ -9,6 +9,9 @@
|
||||
- Be smarter about checking for zipped logs
|
||||
- Change offset value for HVN discs
|
||||
- Update to DIC 20210601
|
||||
- Fix Aaru command normalization
|
||||
- Handle carriage returns better
|
||||
- Add logging helper class
|
||||
|
||||
### 2.0 (2021-04-23)
|
||||
- Rename DICUI to Media Preservation Frontend (MPF)
|
||||
|
||||
@@ -77,18 +77,24 @@ namespace MPF.Utilities
|
||||
continue;
|
||||
}
|
||||
|
||||
// For all except the last, just keep appending to the builder
|
||||
if (i < split.Length - 1)
|
||||
// For the first item, append to anything existing and then write out
|
||||
if (i == 0)
|
||||
{
|
||||
sb.Append(split[i]);
|
||||
handler?.Invoke(baseClass, sb.ToString());
|
||||
sb.Clear();
|
||||
}
|
||||
|
||||
// For the last item, just append so it's dealt with the next time
|
||||
else if (i == split.Length - 1)
|
||||
{
|
||||
sb.Append(split[i]);
|
||||
}
|
||||
|
||||
// For the last item, write out and then put the remainder in the builder
|
||||
// For everything else, directly write out
|
||||
else
|
||||
{
|
||||
handler?.Invoke(baseClass, sb.ToString());
|
||||
sb.Clear();
|
||||
sb.Append(split[i]);
|
||||
handler?.Invoke(baseClass, split[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user