*/
while ((dp = readdir(dir)) != NULL) {
char const *p;
+ size_t len;
if (dp->d_name[0] == '.') continue;
}
if (*p != '\0') continue;
+ /*
+ * Ignore config files generated by deb / rpm packaging updates.
+ */
+ len = strlen(dp->d_name);
+ if ((len > 10) && (strncmp(&dp->d_name[len - 10], ".dpkg-dist", 10) == 0)) {
+ pkg_file:
+ WARN("Ignoring packaging system produced file %s%s", frame->directory, dp->d_name);
+ continue;
+ }
+ if ((len > 9) && (strncmp(&dp->d_name[len - 9], ".dpkg-old", 9) == 0)) goto pkg_file;
+ if ((len > 7) && (strncmp(&dp->d_name[len - 7], ".rpmnew", 9) == 0)) goto pkg_file;
+ if ((len > 8) && (strncmp(&dp->d_name[len - 8], ".rpmsave", 10) == 0)) goto pkg_file;
+
snprintf(stack->buff[1], stack->bufsize, "%s%s",
frame->directory, dp->d_name);