mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Set geometry before start writing image, as some floppy based images are geometry based.
This commit is contained in:
@@ -266,6 +266,14 @@ namespace DiscImageChef.Commands
|
|||||||
|
|
||||||
if(tracks == null)
|
if(tracks == null)
|
||||||
{
|
{
|
||||||
|
DicConsole.WriteLine("Setting geometry to {0} cylinders, {1} heads and {2} sectors per track",
|
||||||
|
inputFormat.Info.Cylinders, inputFormat.Info.Heads,
|
||||||
|
inputFormat.Info.SectorsPerTrack);
|
||||||
|
if(!outputFormat.SetGeometry(inputFormat.Info.Cylinders, inputFormat.Info.Heads,
|
||||||
|
inputFormat.Info.SectorsPerTrack))
|
||||||
|
DicConsole.ErrorWriteLine("Error {0} setting geometry, image may be incorrect, continuing...",
|
||||||
|
outputFormat.ErrorMessage);
|
||||||
|
|
||||||
while(doneSectors < inputFormat.Info.Sectors)
|
while(doneSectors < inputFormat.Info.Sectors)
|
||||||
{
|
{
|
||||||
byte[] sector;
|
byte[] sector;
|
||||||
@@ -553,17 +561,6 @@ namespace DiscImageChef.Commands
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tracks == null)
|
|
||||||
{
|
|
||||||
DicConsole.WriteLine("Setting geometry to {0} cylinders, {1} heads and {2} sectors per track",
|
|
||||||
inputFormat.Info.Cylinders, inputFormat.Info.Heads,
|
|
||||||
inputFormat.Info.SectorsPerTrack);
|
|
||||||
if(!outputFormat.SetGeometry(inputFormat.Info.Cylinders, inputFormat.Info.Heads,
|
|
||||||
inputFormat.Info.SectorsPerTrack))
|
|
||||||
DicConsole.ErrorWriteLine("Error {0} setting geometry, image may be incorrect, continuing...",
|
|
||||||
outputFormat.ErrorMessage);
|
|
||||||
}
|
|
||||||
|
|
||||||
DicConsole.WriteLine("Closing output image.");
|
DicConsole.WriteLine("Closing output image.");
|
||||||
|
|
||||||
if(!outputFormat.Close())
|
if(!outputFormat.Close())
|
||||||
|
|||||||
Reference in New Issue
Block a user