diff options
author | kukosa <kukosa@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-11-30 07:30:20 +0000 |
---|---|---|
committer | kukosa <kukosa@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-11-30 07:30:20 +0000 |
commit | 1dbb57a88427ce18aca8bb71f22c86fc6bd29de4 (patch) | |
tree | 951b5a98b185a4d10cd260623984c05d466fb46b /fileset.c | |
parent | 226aea25ce5f96831b981dfc750e30e5336aebf9 (diff) |
suffix in file set is optional
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20023 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'fileset.c')
-rw-r--r-- | fileset.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -84,8 +84,8 @@ fileset_filename_match_pattern(const char *fname) /* test_00001_20050418010750.cap */ pfx = strrchr(filename, '.'); - if(pfx == NULL) { - return FALSE; + if(pfx == NULL) { /* suffix is optional */ + pfx = filename + strlen(filename); } /* test_00001_20050418010750 */ *pfx = '\0'; @@ -145,6 +145,9 @@ fileset_is_file_in_set(const char *fname1, const char *fname2) pfx1 = strrchr(dup_f1, '.'); pfx2 = strrchr(dup_f2, '.'); + /* suffix is optional */ + if (!pfx1) pfx1 = dup_f1 + strlen(dup_f1); + if (!pfx2) pfx2 = dup_f2 + strlen(dup_f2); /* the optional suffix (file extension) must be equal */ if(strcmp(pfx1, pfx2) != 0) { |