}
if (pclose (fp) != 0) {
- if (r == -1) /* if r == 0, file transfer ended already */
- cancel_receive ();
reply_with_error ("base64 subcommand failed on file: %s", file);
return -1;
}
}
if (close (fd) == -1) {
- int err = errno;
- if (r == -1) /* if r == 0, file transfer ended already */
- cancel_receive ();
- errno = err;
reply_with_perror ("close: %s", filename);
return -1;
}
}
if (pclose (fp) != 0) {
- if (r == -1) /* if r == 0, file transfer ended already */
- r = cancel_receive ();
char *errstr = read_error_file ();
reply_with_error ("tar subcommand failed on directory: %s: %s",
dir, errstr);
}
if (close (data.fd) == -1) {
- err = errno;
- if (r == -1) /* if r == 0, file transfer ended already */
- r = cancel_receive ();
- errno = err;
reply_with_perror ("close: %s", filename);
return -1;
}