break;
}
- if (entry->d_name[0] == '.' &&
- (entry->d_name[1] == '\0' ||
- (entry->d_name[1] == '.' && entry->d_name[2] == '\0')))
+ name_len = strlen(entry->d_name);
+
+ if (should_ignore_filename(entry->d_name, name_len))
continue;
full_path[full_path_len] = '/';
- name_len = strlen(entry->d_name);
memcpy(&full_path[full_path_len + 1], entry->d_name, name_len + 1);
ret = unix_build_dentry_tree_recursive(&child,
full_path,
struct stat stbuf;
int stat_flags;
- ret = try_exclude(full_path, full_path_len, params);
- if (ret < 0) /* Excluded? */
+ ret = try_exclude(full_path, params);
+ if (unlikely(ret < 0)) /* Excluded? */
goto out_progress;
- if (ret > 0) /* Error? */
+ if (unlikely(ret > 0)) /* Error? */
goto out;
if (params->add_flags & (WIMLIB_ADD_FLAG_DEREFERENCE |