mirror of
https://github.com/ckolivas/lrzip.git
synced 2025-12-06 07:12:00 +01:00
Check for free space in the right place for compression and give the right message.
This commit is contained in:
parent
7f45a1f024
commit
32e182c95a
4
rzip.c
4
rzip.c
|
|
@ -766,8 +766,8 @@ void rzip_fd(int fd_in, int fd_out)
|
|||
/* Check if there's enough free space on the device chosen to fit the
|
||||
* compressed file, based on the compressed file being as large as the
|
||||
* uncompressed file. */
|
||||
if (unlikely(fstatvfs(fd_in, &fbuf)))
|
||||
fatal("Failed to fstatvfs in decompress_file\n");
|
||||
if (unlikely(fstatvfs(fd_out, &fbuf)))
|
||||
fatal("Failed to fstatvfs in compress_file\n");
|
||||
free_space = fbuf.f_bsize * fbuf.f_bavail;
|
||||
if (free_space < control.st_size) {
|
||||
if (FORCE_REPLACE)
|
||||
|
|
|
|||
Loading…
Reference in a new issue