Skip to content

Commit

Permalink
Fix comparing local and remote files
Browse files Browse the repository at this point in the history
  • Loading branch information
Rados13 committed Mar 19, 2024
1 parent e3c202c commit 452c6f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/recording_converter.ex
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ defmodule RecordingConverter do

defp check_s3_bucket_and_local_equals?(objects) do
local_files =
output_directory() |> File.ls!() |> Enum.reject(&String.ends_with?(&1, @index_file))
output_directory()
|> File.ls!()
|> Enum.map(&Path.join(output_directory(), &1))
|> Enum.reject(&String.ends_with?(&1, @index_file))

remote_files = MapSet.new(objects)

Expand Down
3 changes: 2 additions & 1 deletion test/integration_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ defmodule RecordingConverter.RecordingTest do
file_name =
file_name
|> String.replace_suffix("?uploadId=#{@upload_id}", "")
|> Path.basename()

# |> Path.basename()

Agent.update(agent, &[file_name | &1])

Expand Down

0 comments on commit 452c6f6

Please sign in to comment.