mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-29 13:23:31 +02:00
gioerror: Add conversion from ENXIO to G_IO_ERROR_NOT_REGULAR_FILE
`ENXIO` can be returned from `open(2)` for special files (FIFOs, device files and domain sockets) which are not backed by anything. This fixes the error returned by `g_file_replace()` when trying to replace such a file, so that it now matches the documentation. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
@@ -107,6 +107,12 @@ g_io_error_from_errno (gint err_no)
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef ENXIO
|
||||
case ENXIO:
|
||||
return G_IO_ERROR_NOT_REGULAR_FILE;
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef EROFS
|
||||
case EROFS:
|
||||
return G_IO_ERROR_READ_ONLY;
|
||||
|
Reference in New Issue
Block a user