Skip to content

Commit 4deb6ff

Browse files
authored
Avoid duplicate files in remote files list cache (#439)
Files on the "always_update" list would show more than once if duplicate entries aren't removed. After the first upload, files that are in the `always_upload` list would start showing up more than once on the list of files. This doesn't cause a real problem but the list of files is not really accurate. Adding this `uniq` solves the problem.
2 parents 8e338d8 + cba481a commit 4deb6ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/asset_sync/storage.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def update_remote_file_list_cache(local_files_to_upload)
108108
return if ignore_existing_remote_files?
109109

110110
File.open(self.remote_file_list_cache_file_path, 'w') do |file|
111-
uploaded = local_files_to_upload + remote_files
111+
uploaded = (local_files_to_upload + remote_files).uniq
112112
file.write(uploaded.to_json)
113113
end
114114
end

0 commit comments

Comments
 (0)