#include <pakfire/types.h>
#include <pakfire/util.h>
-static const char* pakfire_snapshot_excludes[] = {
- "/dev",
- "/proc",
- "/run",
- "/sys",
- "/var/cache/ccache",
- "/var/tmp",
- NULL,
-};
-
-static int pakfire_snapshot_path_is_excluded(const char* path) {
- for (const char** exclude = pakfire_snapshot_excludes; *exclude; exclude++) {
- if (pakfire_string_startswith(path, *exclude))
- return 1;
- }
-
- // No match
- return 0;
-}
-
static int pakfire_snapshot_progressbar(
struct pakfire_progressbar** progressbar, const char* message) {
int r = pakfire_progressbar_create(progressbar, NULL);
continue;
}
- // Skip excludes
- if (pakfire_snapshot_path_is_excluded(path)) {
- DEBUG(pakfire, "Skipping excluded path %s...\n", path);
- continue;
- }
-
archive_read_disk_descend(reader);
// Reset path to relative path in archive