From 9d65e65b24b03da65f5316644064c5ee698fa6df Mon Sep 17 00:00:00 2001 From: Frederic Marchal Date: Tue, 23 Jun 2015 17:48:12 +0200 Subject: [PATCH] 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. --- filelist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.47.2