mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-09-25 00:05:07 +00:00
Order of operations
This commit is contained in:
@@ -105,13 +105,13 @@ namespace SabreTools.Serialization.Wrappers
|
||||
{
|
||||
// Find all file parts
|
||||
FileInfo[] parts = [.. ArchiveFactory.GetFileParts(new FileInfo(Filename))];
|
||||
|
||||
// If there are multiple parts
|
||||
if (parts.Length > 1)
|
||||
zipFile = ZipArchive.Open(parts, readerOptions);
|
||||
|
||||
// Try to read the file path if no entries are found
|
||||
if (zipFile.Entries.Count == 0)
|
||||
zipFile = ZipArchive.Open(parts, readerOptions);
|
||||
|
||||
// If there's any multipart items, try reading the file as well
|
||||
else if (parts.Length > 1)
|
||||
else if (zipFile.Entries.Count == 0)
|
||||
zipFile = ZipArchive.Open(parts, readerOptions);
|
||||
}
|
||||
|
||||
|
||||
@@ -108,13 +108,13 @@ namespace SabreTools.Serialization.Wrappers
|
||||
{
|
||||
// Find all file parts
|
||||
FileInfo[] parts = [.. ArchiveFactory.GetFileParts(new FileInfo(Filename))];
|
||||
|
||||
// If there are multiple parts
|
||||
if (parts.Length > 1)
|
||||
rarFile = RarArchive.Open(parts, readerOptions);
|
||||
|
||||
// Try to read the file path if no entries are found
|
||||
if (rarFile.Entries.Count == 0)
|
||||
rarFile = RarArchive.Open(parts, readerOptions);
|
||||
|
||||
// If there's any multipart items, try reading the file as well
|
||||
else if (parts.Length > 1)
|
||||
else if (rarFile.Entries.Count == 0)
|
||||
rarFile = RarArchive.Open(parts, readerOptions);
|
||||
}
|
||||
|
||||
|
||||
@@ -108,13 +108,13 @@ namespace SabreTools.Serialization.Wrappers
|
||||
{
|
||||
// Find all file parts
|
||||
FileInfo[] parts = [.. ArchiveFactory.GetFileParts(new FileInfo(Filename))];
|
||||
|
||||
// If there are multiple parts
|
||||
if (parts.Length > 1)
|
||||
sevenZip = SevenZipArchive.Open(parts, readerOptions);
|
||||
|
||||
// Try to read the file path if no entries are found
|
||||
if (sevenZip.Entries.Count == 0)
|
||||
sevenZip = SevenZipArchive.Open(parts, readerOptions);
|
||||
|
||||
// If there's any multipart items, try reading the file as well
|
||||
else if (parts.Length > 1)
|
||||
else if (sevenZip.Entries.Count == 0)
|
||||
sevenZip = SevenZipArchive.Open(parts, readerOptions);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user