File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -116,8 +116,8 @@ defmodule Plug.Upload do
116116
117117 defp generate_tmp_dir ( ) do
118118 { 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
121121
122122 if tmp = Enum . find_value ( tmp_roots , & make_tmp_dir ( & 1 <> subdir ) ) do
123123 { :ok , tmp }
@@ -151,7 +151,7 @@ defmodule Plug.Upload do
151151 end
152152
153153 defp path ( prefix , tmp ) do
154- sec = :os . system_time ( :second )
154+ sec = System . system_time ( :second )
155155 rand = :rand . uniform ( 999_999_999_999 )
156156 scheduler_id = :erlang . system_info ( :scheduler_id )
157157 tmp <> "/" <> prefix <> "-" <> i ( sec ) <> "-" <> i ( rand ) <> "-" <> i ( scheduler_id )
You can’t perform that action at this time.
0 commit comments