]> git.ipfire.org Git - thirdparty/sarg.git/blobdiff - filelist.c
Add support to decompress xz files
[thirdparty/sarg.git] / filelist.c
index c90e23dfe17579a3ff7a251515ef11d70b69b960..d4395645d4bdbf6db7564b6b3d6d6b1204a5befc 100644 (file)
@@ -440,7 +440,7 @@ const char *FileListIter_Next(struct _FileListIterator *FIter)
                FIter->NextGlob=0;
        }
        Path=FileListIter_NextWithMask(FIter);
-       if (Path!=NULL)
+       if (Path!=NULL && (Path[0]!='-' || Path[1]!='\0'))
        {
                int ErrCode=glob(Path,GLOB_ERR | GLOB_NOSORT,NULL,&FIter->Glob);
                if (ErrCode!=0)
@@ -456,6 +456,9 @@ const char *FileListIter_Next(struct _FileListIterator *FIter)
                        case GLOB_NOMATCH:
                                debuga(__FILE__,__LINE__,_("No files matching \"%s\"\n"),Path);
                                break;
+                       default:
+                               debuga(__FILE__,__LINE__,_("Failed to glob file pattern \"%s\" with unspecified error code %d"),Path,ErrCode);
+                               break;
                        }
                        exit(EXIT_FAILURE);
                }