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:
parent
38c0ea3128
commit
a4b3a0c955
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user