Do not fail if we are unable to write temporary files, giving a warning only that it might fail if we don't have enough ram

This commit is contained in:
Con Kolivas 2015-04-16 16:38:20 +10:00
parent 788a70e6f6
commit fcb64e6dbb
2 changed files with 18 additions and 14 deletions

View file

@ -703,7 +703,8 @@ ssize_t read_1g(rzip_control *control, int fd, void *buf, i64 len)
/* We're decompressing from STDIN */
if (unlikely(control->in_ofs + len > control->in_maxlen)) {
/* We're unable to fit it all into the temp buffer */
dump_stdin(control);
if (dump_stdin(control))
failure_return(("Inadequate ram to %compress from STDIN and unable to create in tmpfile"), -1);
goto read_fd;
}
if (control->in_ofs + len > control->in_len) {