diff options
| author | ruki <[email protected]> | 2025-10-01 00:36:38 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-10-01 00:36:38 +0800 |
| commit | e4a2d682015b651adfcf7d7494a295c3276d7f10 (patch) | |
| tree | 208f1fc98dec6ea1baeb3dbd294bea3697d30349 /xmake/core/base/os.lua | |
| parent | b86ebe99285371dcdf08483208b7de70a7b8b050 (diff) | |
add hash.random32/64/128
Diffstat (limited to 'xmake/core/base/os.lua')
| -rw-r--r-- | xmake/core/base/os.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua index 41fe07d22..72d395d77 100644 --- a/xmake/core/base/os.lua +++ b/xmake/core/base/os.lua @@ -761,7 +761,8 @@ function os.tmpfile(opt_or_key) key = opt_or_key.key opt = opt_or_key end - return path.join(os.tmpdir(opt), "_" .. (hash.uuid4(key):gsub("-", ""))) + local filename = "_" .. (key and hash.strhash128(key) or (hash.random128())) + return path.join(os.tmpdir(opt), filename) end -- exit program |
