Skip to content

Commit

Permalink
Avoid duplicate files in remote files list cache (#439)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
PikachuEXE authored Aug 23, 2023
2 parents 8e338d8 + cba481a commit 4deb6ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/asset_sync/storage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def update_remote_file_list_cache(local_files_to_upload)
return if ignore_existing_remote_files?

File.open(self.remote_file_list_cache_file_path, 'w') do |file|
uploaded = local_files_to_upload + remote_files
uploaded = (local_files_to_upload + remote_files).uniq
file.write(uploaded.to_json)
end
end
Expand Down

0 comments on commit 4deb6ff

Please sign in to comment.