Skip to content
Snippets Groups Projects
Commit a4edacbe authored by Brian Tarricone's avatar Brian Tarricone Committed by Alexander Schwinn
Browse files

Attempt to fully read into buffer during file compare (#1495)

The kernel (or GVFS backend) is allowed to return from the read call
when it hasn't fully filled up the buffer, even if we haven't reached
EOF yet.  This is usually not going to happen for a local file, but can
easily occur for remote filesystems or other protocols such as using MTP
with a phone or other device.

The solution to this is to instead use g_input_stream_read_all(), which
will block until the buffer has been filled, it's reached EOF, or an
error occurs.

Closes #1495
parent 8fbda9bb
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment