From 452c6f6088db8212e892039ab6e1f5fec5d0ad38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Szuma?= Date: Tue, 19 Mar 2024 07:48:59 +0100 Subject: [PATCH] Fix comparing local and remote files --- lib/recording_converter.ex | 5 ++++- test/integration_test.exs | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/recording_converter.ex b/lib/recording_converter.ex index 36c8448..983543d 100644 --- a/lib/recording_converter.ex +++ b/lib/recording_converter.ex @@ -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) diff --git a/test/integration_test.exs b/test/integration_test.exs index 6a79283..3ce7f35 100644 --- a/test/integration_test.exs +++ b/test/integration_test.exs @@ -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])