+ def update_matches (self):
+ """Updates the contents of instance variables with the current in-filesystem state.
+ This should be run after any operation which can create or delete files."""
+
+ # A NoExtract set is very different from the other sets in this regard. Since we
+ # don't really have a single file that is protected, it's not likely that "normal"
+ # name matching will work as expected.
+ #
+ # Because of this, we will try to find name matches for every single name that is
+ # protected by this set. This will help to detect .1 files that are produced when
+ # repairing this kind of set.
+
+ # Find "normal" name matched files
+ self.name_matched_files = rsutil.common.find_name_matches (self.dir, self.basename)
+
+ # Find "extra" name matched files
+ for f in self.prot_matched_files:
+ f_basename = rsutil.common.get_basename (f)
+ f_matches = rsutil.common.find_name_matches (self.dir, f_basename)
+
+ self.name_matched_files = rsutil.common.no_duplicates (self.name_matched_files +
+ f_matches)
+
+ # Update the all_files part now
+ self.all_files = rsutil.common.no_duplicates (self.name_matched_files + self.prot_matched_files)
+