mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
* DiscImageChef.Tests/Filters/PCExchange.cs:
* DiscImageChef.Tests/DiscImageChef.Tests.csproj: Added test for PCExchange filter. * DiscImageChef.Filters/PCExchange.cs: Solved handling last entry of FINDER.DAT. Close FINDER.DAT to prevent sharing violation.
This commit is contained in:
@@ -215,7 +215,7 @@ namespace DiscImageChef.Filters
|
||||
|
||||
FileStream finderDatStream = new FileStream(Path.Combine(parentFolder, FinderInfo), FileMode.Open, FileAccess.Read);
|
||||
|
||||
while(finderDatStream.Position + 0x5C < finderDatStream.Length)
|
||||
while(finderDatStream.Position + 0x5C <= finderDatStream.Length)
|
||||
{
|
||||
PCExchangeEntry datEntry = new PCExchangeEntry();
|
||||
byte[] datEntry_b = new byte[Marshal.SizeOf(datEntry)];
|
||||
@@ -269,7 +269,7 @@ namespace DiscImageChef.Filters
|
||||
|
||||
FileStream finderDatStream = new FileStream(Path.Combine(parentFolder, FinderInfo), FileMode.Open, FileAccess.Read);
|
||||
|
||||
while(finderDatStream.Position + 0x5C < finderDatStream.Length)
|
||||
while(finderDatStream.Position + 0x5C <= finderDatStream.Length)
|
||||
{
|
||||
PCExchangeEntry datEntry = new PCExchangeEntry();
|
||||
byte[] datEntry_b = new byte[Marshal.SizeOf(datEntry)];
|
||||
@@ -313,6 +313,8 @@ namespace DiscImageChef.Filters
|
||||
|
||||
basePath = path;
|
||||
opened = true;
|
||||
|
||||
finderDatStream.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user