diff options
| author | ruki <[email protected]> | 2019-12-21 00:38:20 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-12-20 21:50:04 +0800 |
| commit | 1ac4fc9dd15ebbeec2adf0229ee70c90f5362829 (patch) | |
| tree | 8c794744366afd52583ff3aee495b522e0d124dd /xmake/core/base/os.lua | |
| parent | ec7035398c3ad32ccca6d29b96895864d1802fb2 (diff) | |
improve os.tmpdir
Diffstat (limited to 'xmake/core/base/os.lua')
| -rw-r--r-- | xmake/core/base/os.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua index 4a31db46c..cc2da0478 100644 --- a/xmake/core/base/os.lua +++ b/xmake/core/base/os.lua @@ -141,7 +141,10 @@ function os._ramdir() end if ramdir_root == nil then if os.host() == "linux" and os.isdir("/dev/shm") then - ramdir_root = "/dev/shm" + if io.writefile("/dev/shm/.xmake_test", "test") then + ramdir_root = "/dev/shm" + os.rm("/dev/shm/.xmake_test") + end elseif os.host() == "macosx" and os.isdir("/Volumes/RAM") then -- @note we need the user to execute the command to create it. -- diskutil partitionDisk `hdiutil attach -nomount ram://8388608` GPT APFS "RAM" 0 |
