Skip archived user files

This commit is contained in:
ZeroNet 2016-08-10 12:42:29 +02:00
parent 0275954fb7
commit 67f75c4bef

View file

@ -245,7 +245,8 @@ class Site(object):
num_modified = 0
for inner_path, modified in res["modified_files"].iteritems(): # Check if the peer has newer files than we
content = self.content_manager.contents.get(inner_path)
if (not content or modified > content["modified"]) and inner_path not in self.bad_files:
newer = not content or modified > content["modified"]
if newer and inner_path not in self.bad_files and not self.content_manager.isArchived(inner_path, modified):
num_modified += 1
# We dont have this file or we have older
self.bad_files[inner_path] = self.bad_files.get(inner_path, 0) + 1 # Mark as bad file