|
|
|
@ -74,6 +74,7 @@ class FolderSynchronizer:
|
|
|
|
|
count_sync = 0
|
|
|
|
|
for root, _, files in os.walk(src_folder):
|
|
|
|
|
for filename in files:
|
|
|
|
|
try:
|
|
|
|
|
src_path = os.path.join(root, filename)
|
|
|
|
|
rel_dir = os.path.relpath(root, src_folder)
|
|
|
|
|
dest_path = os.path.join(dest_folder, rel_dir, filename)
|
|
|
|
@ -98,7 +99,9 @@ class FolderSynchronizer:
|
|
|
|
|
modified1, exist1, modified2, exist2 = src_modified, 1, dest_modified, 1
|
|
|
|
|
else:
|
|
|
|
|
modified1, exist1, modified2, exist2 = src_modified, 1, file_info[5], file_info[6]
|
|
|
|
|
|
|
|
|
|
except:
|
|
|
|
|
pass
|
|
|
|
|
finally:
|
|
|
|
|
self.update_db(rel_dir, filename, modified1, exist1, modified2, exist2)
|
|
|
|
|
|
|
|
|
|
return total_sync, count_sync
|
|
|
|
|