From: Frederic Marchal Date: Tue, 23 Jun 2015 15:48:12 +0000 (+0200) Subject: Don't glob the file name "-" that means to read from stdin X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9d65e65b24b03da65f5316644064c5ee698fa6df;p=thirdparty%2Fsarg.git Don't glob the file name "-" that means to read from stdin The special file name "-" must not be globed as the content will be read from stdin. This change fix the error message: No files matching "-" Thanks to Yakushev Evgeniy for reporting this bug. --- diff --git a/filelist.c b/filelist.c index c90e23d..c36b96d 100644 --- a/filelist.c +++ b/filelist.c @@ -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)