X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=daemon%2Ftar.c;h=a33ec3a0a6a2a11dec1494e933655d9b41e3263c;hb=816f3bcde7ed64b57b35fea80b09a721317df274;hp=ecf919db19fba0a3ab5912f04b874f9f03ea7d2a;hpb=0232e722826cfda0f6042da983f9eb871f24e946;p=libguestfs.git diff --git a/daemon/tar.c b/daemon/tar.c index ecf919d..a33ec3a 100644 --- a/daemon/tar.c +++ b/daemon/tar.c @@ -139,7 +139,7 @@ do_tar_out (const char *dir) } } - if (r == -1) { + if (ferror (fp)) { perror (dir); send_file_end (1); /* Cancel. */ pclose (fp); @@ -261,7 +261,7 @@ do_tgz_out (const char *dir) } } - if (r == -1) { + if (ferror (fp)) { perror (dir); send_file_end (1); /* Cancel. */ pclose (fp);