/* 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';
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) {
} else {
/* no, this is a "standalone file", just add this one */
entry = fileset_add_file(dirname->str, get_basename(fname), TRUE /* current */);
- if(entry) {
- fileset_dlg_add_file(entry);
- }
+ /* don't add the file to the dialog here, this will be done in fileset_update_dlg() below */
}
g_string_free(dirname, TRUE /* free_segment */);