From 077309af3e45c573f26e915659e5291c573bcf7a Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sun, 13 Jan 2013 09:32:13 +0000 Subject: [PATCH] Curbed the number of wildcard warnings to 3 for iso and 3 for disk --- xorriso/match.c | 13 ++++++++++++- xorriso/xorriso_timestamp.h | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/xorriso/match.c b/xorriso/match.c index aeae06f0..4bca3b00 100644 --- a/xorriso/match.c +++ b/xorriso/match.c @@ -1,7 +1,7 @@ /* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images. - Copyright 2007-2010 Thomas Schmitt, + Copyright 2007-2013 Thomas Schmitt, Provided under GPL version 2 or later. @@ -753,8 +753,19 @@ ex:; */ int Xorriso_warn_of_wildcards(struct XorrisO *xorriso, char *path, int flag) { + static int count_iso= 0, count_disk= 0, max_iso= 3, max_disk= 3; + if(strchr(path,'*')!=NULL || strchr(path,'?')!=NULL || strchr(path,'[')!=NULL) { + if(flag & 2) { + count_disk++; + if(count_disk > max_disk) + return(1); + } else { + count_iso++; + if(count_iso > max_iso) + return(1); + } if(flag&1) { sprintf(xorriso->info_text, "Pattern expansion of wildcards \"*?[\" does not apply to this command"); diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 7b8b874a..61e0bce2 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2013.01.09.101831" +#define Xorriso_timestamP "2013.01.13.093116"