mirror of
https://github.com/PredatH0r/ChanSort.git
synced 2026-05-07 16:57:56 +02:00
- added detection for unsupported .SDX with encrypted/compressed content
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using ChanSort.Api;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using ChanSort.Api;
|
||||
|
||||
namespace ChanSort.Loader.SatcoDX
|
||||
{
|
||||
@@ -10,6 +12,14 @@ namespace ChanSort.Loader.SatcoDX
|
||||
|
||||
public SerializerBase CreateSerializer(string inputFile)
|
||||
{
|
||||
var buffer = new byte[7];
|
||||
using (var strm = new FileStream(inputFile, FileMode.Open))
|
||||
{
|
||||
var len = strm.Read(buffer, 0, buffer.Length);
|
||||
if (len != buffer.Length || Encoding.ASCII.GetString(buffer, 0, len) != "SATCODX")
|
||||
return null;
|
||||
}
|
||||
|
||||
return new Serializer(inputFile);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user