[io-layer] When deleting a file, check for EROFS and verify if the file exists. Fixes...
authorRodrigo Kumpera <kumpera@gmail.com>
Tue, 20 Jun 2017 20:39:48 +0000 (13:39 -0700)
committerRodrigo Kumpera <kumpera@gmail.com>
Tue, 20 Jun 2017 21:59:09 +0000 (14:59 -0700)
commit3454feb426777593f505b6732a92170a637a4383
treea178534c38829a83ed3f4a6a8f46f2c26c2c85db
parent1334748e5aa84a184ff15431a051f1930eaf4d9d
[io-layer] When deleting a file, check for EROFS and verify if the file exists. Fixes #57629.

Linux has this particular behavior of returning ENOFS when unlinking from an read only FS.
Even if the file doesn't exists! Darwin does the sane thing and return ENOENT in this case.

To workaround this, if unlink returns EROFS, we stat the file and deal with that.
mono/metadata/w32file-unix.c