qopen-in-vm: ensure we can't mistake a non empty file for an empty one

st_size is off_t, which may be larger than int.
This commit is contained in:
Vincent Penquerc'h 2013-12-29 07:04:11 -05:00 committed by Marek Marczykowski-Górecki
parent 38c0ea3128
commit a4b3a0c955

View File

@ -44,7 +44,7 @@ int copy_and_return_nonemptiness(int tmpfd)
gui_fatal("fstat");
close(tmpfd);
return st.st_size;
return st.st_size > 0;
}
void recv_file_nowrite(char *fname)