提交 fec0e655 编写于 作者: R Rodrigo Kumpera

[runtime] Update comment with link to Linux Kernel fix.

上级 3454feb4
......@@ -2545,9 +2545,13 @@ gboolean mono_w32file_delete(const gunichar2 *name)
if (retval == -1) {
/* On linux, calling unlink on an non-existing file in a read-only mount will fail with EROFS.
The expected behavior is for this function to return FALSE and not trigger an exception.
To work around this behavior, we stat the file on failure.
*/
* The expected behavior is for this function to return FALSE and not trigger an exception.
* To work around this behavior, we stat the file on failure.
*
* This was supposedly fixed on kernel 3.0 [1] but we could reproduce it with Ubuntu 16.04 which has kernel 4.4.
* We can't remove this workaround until the early 2020's when most Android deviced will have a fix.
* [1] https://github.com/torvalds/linux/commit/50338b889dc504c69e0cb316ac92d1b9e51f3c8a
*/
if (errno == EROFS) {
MonoIOStat stat;
if (mono_w32file_get_attributes_ex (name, &stat)) //The file exists, so must be due the RO file system
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册