mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Allow appending on writable images, and correct some incorrect values.
This commit is contained in:
@@ -296,7 +296,7 @@ namespace DiscImageChef.DiscImages
|
||||
|
||||
imageInfo = new ImageInfo {MediaType = mediaType, SectorSize = sectorSize, Sectors = sectors};
|
||||
|
||||
try { writingStream = new FileStream(path, FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None); }
|
||||
try { writingStream = new FileStream(path, FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.None); }
|
||||
catch(IOException e)
|
||||
{
|
||||
ErrorMessage = $"Could not create new image file, exception {e.Message}";
|
||||
@@ -394,12 +394,12 @@ namespace DiscImageChef.DiscImages
|
||||
|
||||
writingStream.Seek(0, SeekOrigin.Begin);
|
||||
writingStream.Write(tmp, 0, tmp.Length);
|
||||
|
||||
writingStream.Flush();
|
||||
writingStream.Close();
|
||||
|
||||
ErrorMessage = "";
|
||||
IsWriting = false;
|
||||
|
||||
ErrorMessage = "";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user