diff options
| author | Alexander M Pickering <alex@cogarr.net> | 2022-12-01 22:53:56 -0600 |
|---|---|---|
| committer | Alexander M Pickering <alex@cogarr.net> | 2022-12-01 22:53:56 -0600 |
| commit | f17792721e8f49337747b7d107c6c42513685835 (patch) | |
| tree | b08c91fbf2233fe2ba78b145538f8da20046b734 /src/opt_parser.lua | |
| parent | 8d0b14c2aa854a45c0aeff8b9d888f3d9ea1b003 (diff) | |
| download | mdoc-f17792721e8f49337747b7d107c6c42513685835.tar.gz mdoc-f17792721e8f49337747b7d107c6c42513685835.tar.bz2 mdoc-f17792721e8f49337747b7d107c6c42513685835.zip | |
Use the os temp directory
Use the operating system's temporary directory instead of trying to use
the local file system's.
Diffstat (limited to 'src/opt_parser.lua')
| -rw-r--r-- | src/opt_parser.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/opt_parser.lua b/src/opt_parser.lua index 5c3b28d..a442ef8 100644 --- a/src/opt_parser.lua +++ b/src/opt_parser.lua @@ -105,7 +105,7 @@ ret.check_file = function(path) end
ret.check_executable = function(name)
- local tmpname = "./" .. os.tmpname()
+ local tmpname = os.tmpname() -- Each os has a differnt place it makes tmp file, don't modify it.
local pd = assert(io.popen(name .. " > " .. tmpname, "w"))
pd:write("Hello, world!")
pd:close()
|
