fix change check for dirs
We recalculate the stored dir size for every dir to be the sum of all ancestors, so comparing the dir size as reported by the file system will usually always differ.
This commit is contained in:
parent
d995651487
commit
9720d75a61
1 changed files with 2 additions and 1 deletions
|
|
@ -408,7 +408,8 @@ def upsert_if_changed(
|
||||||
assert isinstance(row, Row) # Required for Mypy 1.0.0.
|
assert isinstance(row, Row) # Required for Mypy 1.0.0.
|
||||||
|
|
||||||
is_changed = (
|
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_changed"] != row.stat_changed # Ignore ctime, mtime is enough
|
||||||
or new_data["stat_modified"] != row.stat_modified
|
or new_data["stat_modified"] != row.stat_modified
|
||||||
or new_data["stat_type"] != row.stat_type
|
or new_data["stat_type"] != row.stat_type
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue