diff --git a/metadex/db.py b/metadex/db.py index 5f5836b..e45e8af 100644 --- a/metadex/db.py +++ b/metadex/db.py @@ -408,7 +408,8 @@ def upsert_if_changed( assert isinstance(row, Row) # Required for Mypy 1.0.0. is_changed = ( - new_data["stat_bytes"] != row.stat_bytes + # For dirs we ignore the reported size, because we're not storing it as-is. + (new_data["stat_type"] != "d" and new_data["stat_bytes"] != row.stat_bytes) # or new_data["stat_changed"] != row.stat_changed # Ignore ctime, mtime is enough or new_data["stat_modified"] != row.stat_modified or new_data["stat_type"] != row.stat_type