Change to detecting only whether lrzip is inappropriately being passed a directory since there may be other valid file types.

This commit is contained in:
Con Kolivas 2011-04-22 19:35:04 +10:00
parent efa8f0f6a5
commit 5352debf15

7
main.c
View file

@ -731,10 +731,9 @@ int main(int argc, char *argv[])
struct stat infile_stat; struct stat infile_stat;
stat(control.infile, &infile_stat); stat(control.infile, &infile_stat);
if (unlikely(!S_ISREG(infile_stat.st_mode) && if (unlikely(S_ISDIR(infile_stat.st_mode)))
!S_ISLNK(infile_stat.st_mode))) failure("lrzip only works directly on FILES.\n"
failure("lrzip only works directly on FILES.\n" "Use lrztar or pipe through tar for compressing directories.\n");
"Use lrztar or pipe through tar for compressing directories.\n");
} }
} }