From 5352debf15c35c1e85bc7e7d1ca37ccc30c48f17 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 22 Apr 2011 19:35:04 +1000 Subject: [PATCH] Change to detecting only whether lrzip is inappropriately being passed a directory since there may be other valid file types. --- main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/main.c b/main.c index c2a6a7b..e6d6663 100644 --- a/main.c +++ b/main.c @@ -731,10 +731,9 @@ int main(int argc, char *argv[]) struct stat infile_stat; stat(control.infile, &infile_stat); - if (unlikely(!S_ISREG(infile_stat.st_mode) && - !S_ISLNK(infile_stat.st_mode))) - failure("lrzip only works directly on FILES.\n" - "Use lrztar or pipe through tar for compressing directories.\n"); + if (unlikely(S_ISDIR(infile_stat.st_mode))) + failure("lrzip only works directly on FILES.\n" + "Use lrztar or pipe through tar for compressing directories.\n"); } }