diff --git a/fccs_scan.py b/fccs_scan.py index 988231d..d245d38 100644 --- a/fccs_scan.py +++ b/fccs_scan.py @@ -82,9 +82,14 @@ def main(): log(f"ERROR: backup directory not found: {backup_dir}") sys.exit(1) + # Only subdirectories are drawers. When pointed at FCCS's live data dir + # (e.g. the Restore directory) there are also system folders that start with + # "$" and miscellaneous loose files — skip both. The isdir check drops the + # files; the "$" prefix check drops the system folders. drawer_ids = sorted( name for name in os.listdir(backup_dir) - if os.path.isdir(os.path.join(backup_dir, name)) + if not name.startswith("$") + and os.path.isdir(os.path.join(backup_dir, name)) ) with open(output_file, "w", encoding="utf-8") as f: