sysupdate: keep database of installed files/patterns, and use to GC them (#42646)
Transfer files might come and go, components might be enabled and disabled. Patterns might change. Let's keep track of what we install, so that we can automatically gc everything no longer owned by any enabled transfer.
This commit is contained in:
@@ -1145,6 +1145,9 @@ bool string_is_safe(const char *p, StringSafeFlags flags) {
|
||||
if (FLAGS_SET(flags, STRING_FILENAME) && !filename_is_valid(p))
|
||||
return false;
|
||||
|
||||
if (FLAGS_SET(flags, STRING_FILENAME_PART) && !filename_part_is_valid(p))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user