+ ret = call_progress(params->progfunc, WIMLIB_PROGRESS_MSG_TEST_FILE_EXCLUSION,
+ &info, params->progctx);
+
+ progress_put_win32_path(cookie);
+
+ if (ret)
+ return ret;
+ if (info.test_file_exclusion.will_exclude)
+ return -1;
+ }
+
+ return 0;
+}
+
+/*
+ * Determine whether a directory entry of the specified name should be ignored.
+ * This is a lower level function which runs prior to try_exclude(). It handles
+ * the standard '.' and '..' entries, which show up in directory listings but
+ * should not be archived. It also checks for odd filenames that usually should
+ * not exist but could cause problems if archiving them were to be attempted.
+ */
+bool
+should_ignore_filename(const tchar *name, const int name_nchars)
+{
+ if (name_nchars <= 0) {
+ WARNING("Ignoring empty filename");
+ return true;