Merge pull request #1786 from SpecLad:cap-images-file-pattern
This commit is contained in:
commit
411629a57d
@ -200,8 +200,18 @@ static char* icvExtractPattern(const char *filename, unsigned *offset)
|
|||||||
}
|
}
|
||||||
else // no pattern filename was given - extract the pattern
|
else // no pattern filename was given - extract the pattern
|
||||||
{
|
{
|
||||||
for(at = name; *at && !isdigit(*at); at++)
|
at = name;
|
||||||
;
|
|
||||||
|
// ignore directory names
|
||||||
|
char *slash = strrchr(at, '/');
|
||||||
|
if (slash) at = slash + 1;
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
slash = strrchr(at, '\\');
|
||||||
|
if (slash) at = slash + 1;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
while (*at && !isdigit(*at)) at++;
|
||||||
|
|
||||||
if(!*at)
|
if(!*at)
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user