Skip to content

Commit f13718c

Browse files
committed
Add normalize_path
1 parent db42b5c commit f13718c

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

config/config.exs

+3
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,7 @@ config :logger,
88
[level_lower_than: :info]
99
]
1010

11+
config :ex_aws,
12+
normalize_path: false
13+
1114
import_config "#{config_env()}.exs"

lib/recording_converter.ex

+7-10
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,13 @@ defmodule RecordingConverter do
125125
output_directory = Application.fetch_env!(:recording_converter, :output_dir_path)
126126

127127
if String.starts_with?(output_directory, ".") do
128-
convert_to_absolute_path(output_directory)
128+
output_directory =
129+
output_directory
130+
|> Path.split()
131+
|> Enum.drop(1)
132+
|> Path.join()
133+
134+
"#{s3_directory()}/#{output_directory}"
129135
else
130136
output_directory
131137
end
@@ -134,13 +140,4 @@ defmodule RecordingConverter do
134140
defp image_url() do
135141
Application.fetch_env!(:recording_converter, :image_url)
136142
end
137-
138-
defp convert_to_absolute_path(output_directory) do
139-
s3_directory()
140-
|> Path.join(output_directory)
141-
|> Path.expand("")
142-
|> Path.split()
143-
|> Enum.drop(1)
144-
|> Path.join()
145-
end
146143
end

0 commit comments

Comments
 (0)