Allow opening read-only devices on Linux.

This commit is contained in:
2019-01-01 02:06:00 +00:00
parent 357ea1e666
commit 59e2907500

View File

@@ -94,7 +94,7 @@ namespace DiscImageChef.Devices
{
LastError = Marshal.GetLastWin32Error();
if(LastError == 13) // EACCES
if(LastError == 13 || LastError == 30) // EACCES or EROFS
{
FileHandle = Linux.Extern.open(devicePath, FileFlags.Readonly | FileFlags.NonBlocking);
if((int)FileHandle < 0)