diff --git a/DiscImageChef.DiscImages/DiskCopy42.cs b/DiscImageChef.DiscImages/DiskCopy42.cs index c0901062..74d4adc4 100644 --- a/DiscImageChef.DiscImages/DiskCopy42.cs +++ b/DiscImageChef.DiscImages/DiskCopy42.cs @@ -793,7 +793,8 @@ namespace DiscImageChef.DiscImages public bool IsWriting { get; private set; } public string ErrorMessage { get; private set; } - public bool Create(string path, MediaType mediaType, Dictionary options, ulong sectors) + public bool Create(string path, MediaType mediaType, Dictionary options, ulong sectors, + uint sectorSize) { header = new Dc42Header(); bool tags = false; @@ -802,6 +803,12 @@ namespace DiscImageChef.DiscImages if(options != null && options.TryGetValue("macosx", out string tmpOption)) bool.TryParse(tmpOption, out macosx); + if(sectorSize != 512) + { + ErrorMessage = "Unsupported sector size"; + return false; + } + switch(mediaType) { case MediaType.AppleFileWare: diff --git a/DiscImageChef.DiscImages/IWritableImage.cs b/DiscImageChef.DiscImages/IWritableImage.cs index 332addb4..a461ccf0 100644 --- a/DiscImageChef.DiscImages/IWritableImage.cs +++ b/DiscImageChef.DiscImages/IWritableImage.cs @@ -65,7 +65,7 @@ namespace DiscImageChef.DiscImages bool IsWriting { get; } string ErrorMessage { get; } - + /// /// Creates a new image in the specified path, for the specified , with the /// specified options to hold a media with the specified number of sectors @@ -74,8 +74,10 @@ namespace DiscImageChef.DiscImages /// that will be written in the image /// Options to be used when creating new image /// How many sectors the media has. + /// /// true if operating completed successfully, false otherwise - bool Create(string path, MediaType mediaType, Dictionary options, ulong sectors); + bool Create(string path, MediaType mediaType, Dictionary options, ulong sectors, + uint sectorSize); /// /// Writes a media tag to the image diff --git a/DiscImageChef/Commands/ConvertImage.cs b/DiscImageChef/Commands/ConvertImage.cs index 65bd0ccd..748ab22c 100644 --- a/DiscImageChef/Commands/ConvertImage.cs +++ b/DiscImageChef/Commands/ConvertImage.cs @@ -192,7 +192,7 @@ namespace DiscImageChef.Commands } if(!outputFormat.Create(options.OutputFile, inputFormat.Info.MediaType, new Dictionary(), - inputFormat.Info.Sectors)) + inputFormat.Info.Sectors, inputFormat.Info.SectorSize)) { DicConsole.ErrorWriteLine("Error {0} creating output image.", outputFormat.ErrorMessage); return;