diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2018-06-24 19:16:57 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-07-01 15:51:36 -0300 |
commit | f7afb0a735aa9284742e18c972c30ff266f2d4ad (patch) | |
tree | 6edba4c90d6e000f3eaab0a9d600c1cd8fa397e3 /src | |
parent | 9add0ca679b6bf273fe7aad7fa8fbc03119649f6 (diff) | |
download | luarocks-f7afb0a735aa9284742e18c972c30ff266f2d4ad.tar.gz luarocks-f7afb0a735aa9284742e18c972c30ff266f2d4ad.tar.bz2 luarocks-f7afb0a735aa9284742e18c972c30ff266f2d4ad.zip |
fs: math.randomseed only once
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/fs.lua | 2 | ||||
-rw-r--r-- | src/luarocks/fs/win32.lua | 2 | ||||
-rw-r--r-- | src/luarocks/upload/multipart.lua | 2 |
3 files changed, 2 insertions, 4 deletions
diff --git a/src/luarocks/fs.lua b/src/luarocks/fs.lua index 911ac474..ad439ccf 100644 --- a/src/luarocks/fs.lua +++ b/src/luarocks/fs.lua | |||
@@ -16,6 +16,8 @@ local cfg = require("luarocks.core.cfg") | |||
16 | local pack = table.pack or function(...) return { n = select("#", ...), ... } end | 16 | local pack = table.pack or function(...) return { n = select("#", ...), ... } end |
17 | local unpack = table.unpack or unpack | 17 | local unpack = table.unpack or unpack |
18 | 18 | ||
19 | math.randomseed(os.time()) | ||
20 | |||
19 | do | 21 | do |
20 | local old_popen, old_execute | 22 | local old_popen, old_execute |
21 | 23 | ||
diff --git a/src/luarocks/fs/win32.lua b/src/luarocks/fs/win32.lua index bf133448..46a11fa0 100644 --- a/src/luarocks/fs/win32.lua +++ b/src/luarocks/fs/win32.lua | |||
@@ -9,8 +9,6 @@ local cfg = require("luarocks.core.cfg") | |||
9 | local dir = require("luarocks.dir") | 9 | local dir = require("luarocks.dir") |
10 | local util = require("luarocks.util") | 10 | local util = require("luarocks.util") |
11 | 11 | ||
12 | math.randomseed(os.time()) | ||
13 | |||
14 | -- Monkey patch io.popen and os.execute to make sure quoting | 12 | -- Monkey patch io.popen and os.execute to make sure quoting |
15 | -- works as expected. | 13 | -- works as expected. |
16 | -- See http://lua-users.org/lists/lua-l/2013-11/msg00367.html | 14 | -- See http://lua-users.org/lists/lua-l/2013-11/msg00367.html |
diff --git a/src/luarocks/upload/multipart.lua b/src/luarocks/upload/multipart.lua index aad2e439..56ae873e 100644 --- a/src/luarocks/upload/multipart.lua +++ b/src/luarocks/upload/multipart.lua | |||
@@ -5,8 +5,6 @@ local File = {} | |||
5 | 5 | ||
6 | local unpack = unpack or table.unpack | 6 | local unpack = unpack or table.unpack |
7 | 7 | ||
8 | math.randomseed(os.time()) | ||
9 | |||
10 | -- socket.url.escape(s) from LuaSocket 3.0rc1 | 8 | -- socket.url.escape(s) from LuaSocket 3.0rc1 |
11 | function multipart.url_escape(s) | 9 | function multipart.url_escape(s) |
12 | return (string.gsub(s, "([^A-Za-z0-9_])", function(c) | 10 | return (string.gsub(s, "([^A-Za-z0-9_])", function(c) |