git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix tar-in command hangs when running out of disk space (RHBZ#580246).
[libguestfs.git]
/
daemon
/
upload.c
diff --git
a/daemon/upload.c
b/daemon/upload.c
index
e15eade
..
65c6667
100644
(file)
--- a/
daemon/upload.c
+++ b/
daemon/upload.c
@@
-77,7
+77,8
@@
do_upload (const char *filename)
if (close (fd) == -1) {
err = errno;
- cancel_receive ();
+ if (r == -1) /* if r == 0, file transfer ended already */
+ cancel_receive ();
errno = err;
reply_with_perror ("close: %s", filename);
return -1;