Consider that the metadata has changed when the Last-Modified changes

Also adds a spec for it
This commit is contained in:
Greg Karékinian
2018-04-30 16:39:12 +02:00
parent ca0127d6a6
commit f14ef4dc21
4 changed files with 26 additions and 2 deletions

View File

@@ -289,10 +289,9 @@ module RemoteStorage
def metadata_changed?(old_metadata, new_metadata)
# check metadata relevant to the directory listing
# ie. the timestamp (m) is not relevant, because it's not used in
# the listing
return old_metadata["e"] != new_metadata[:e] ||
old_metadata["s"] != new_metadata[:s].to_s ||
old_metadata["m"] != new_metadata[:m] ||
old_metadata["t"] != new_metadata[:t]
end