File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -116,8 +116,8 @@ defmodule Plug.Upload do
116
116
117
117
defp generate_tmp_dir ( ) do
118
118
{ tmp_roots , suffix } = :persistent_term . get ( __MODULE__ )
119
- { mega , _ , _ } = :os . timestamp ( )
120
- subdir = "/plug-" <> i ( mega ) <> "-" <> suffix
119
+ sec = System . system_time ( :second ) |> div ( 1024 * 1024 )
120
+ subdir = "/plug-" <> i ( sec ) <> "-" <> suffix
121
121
122
122
if tmp = Enum . find_value ( tmp_roots , & make_tmp_dir ( & 1 <> subdir ) ) do
123
123
{ :ok , tmp }
@@ -151,7 +151,7 @@ defmodule Plug.Upload do
151
151
end
152
152
153
153
defp path ( prefix , tmp ) do
154
- sec = :os . system_time ( :second )
154
+ sec = System . system_time ( :second )
155
155
rand = :rand . uniform ( 999_999_999_999 )
156
156
scheduler_id = :erlang . system_info ( :scheduler_id )
157
157
tmp <> "/" <> prefix <> "-" <> i ( sec ) <> "-" <> i ( rand ) <> "-" <> i ( scheduler_id )
You can’t perform that action at this time.
0 commit comments