mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-09-23 23:35:09 +00:00
Simpler completeness checks
This commit is contained in:
@@ -108,7 +108,7 @@ namespace SabreTools.Serialization.Wrappers
|
||||
zipFile = ZipArchive.Open(Filename!, readerOptions);
|
||||
|
||||
// If there's any multipart items, try reading the file as well
|
||||
else if (System.Array.Exists([.. zipFile.Entries], e => !e.IsComplete))
|
||||
else if (!zipFile.IsComplete)
|
||||
zipFile = ZipArchive.Open(Filename!, readerOptions);
|
||||
}
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace SabreTools.Serialization.Wrappers
|
||||
rarFile = RarArchive.Open(Filename!, readerOptions);
|
||||
|
||||
// If there's any multipart items, try reading the file as well
|
||||
else if (System.Array.Exists([.. rarFile.Entries], e => !e.IsComplete))
|
||||
else if (!rarFile.IsComplete)
|
||||
rarFile = RarArchive.Open(Filename!, readerOptions);
|
||||
}
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace SabreTools.Serialization.Wrappers
|
||||
sevenZip = SevenZipArchive.Open(Filename!, readerOptions);
|
||||
|
||||
// If there's any multipart items, try reading the file as well
|
||||
else if (System.Array.Exists([.. sevenZip.Entries], e => !e.IsComplete))
|
||||
else if (!sevenZip.IsComplete)
|
||||
sevenZip = SevenZipArchive.Open(Filename!, readerOptions);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user