Public bug reported:
Description:
Environment: Linux Mint 22.3 XFCE, GLib 2.80.0-6ubuntu3.10,
VirtualBox Guest Additions 7.2.22.
Filesystem: VirtualBox shared folders (vboxsf).
Copying files between two VirtualBox shared folders using GIO
applications (Nemo, Thunar) fails with Error splicing file: Bad file
descriptor.
Copying the same files using cp or dd works correctly.
strace shows:
copy_file_range(7, [0], 8, [0], 5, 0) = -1 EBADF (Bad file descriptor)
When copy_file_range() returns EBADF on a filesystem that does not
support this operation, GLib should fall back to regular buffered
copying.
Proposed fix:
Add errsv == EBADF to the list of errors treated as
G_IO_ERROR_NOT_SUPPORTED in do_copy_file_range() in gio/gfile.c.
- else if (errsv == ENOSYS || errsv == EINVAL || errsv == EOPNOTSUPP || errsv
== EXDEV)
+ else if (errsv == ENOSYS || errsv == EINVAL || errsv == EOPNOTSUPP || errsv
== EXDEV || errsv == EBADF)
Testing:
The patched GLib was rebuilt and installed on the affected system. gio
copy and Thunar file copying between the two VirtualBox shared folders
then worked correctly.
** Affects: glib2.0 (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to glib2.0 in Ubuntu.
https://bugs.launchpad.net/bugs/2174536
Title:
GFile copy fails with EBADF on VirtualBox shared folders instead of
falling back to regular copy
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glib2.0/+bug/2174536/+subscriptions
--
desktop-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs