gfile: Fix file size detection when copying on btrfs
When the `g_file_copy` function is used with files on BTRFS, the `GLib-GIO-FATAL-CRITICAL: GFileInfo created without standard::size` error is printed. This is because the `g_file_get_size` function is used to obtain the file size for the progress callback, but it uses the wrong `GFileInfo` object that is meant for attributes to be copied with the file. The file size attribute is missing there obviously. Let's obtain the file size over the `fstat` call the same way as it is done in the `splice_stream_with_progress` function to get rid of those errors and to fix the progress reporting.
parent
e75ba524
Please register or sign in to comment