mirror of
https://github.com/etlegacy/wolfadmin.git
synced 2024-11-10 06:41:53 +00:00
Fixed platform detection on Windows (refs #74)
This commit is contained in:
parent
74f761f39e
commit
935f71d4ab
1 changed files with 5 additions and 6 deletions
|
@ -90,13 +90,12 @@ end
|
|||
|
||||
function settings.determineOS()
|
||||
local system = io.popen("uname -s"):read("*l")
|
||||
local platform
|
||||
|
||||
if system == "Linux" or system == "unix" or system == "FreeBSD" or system == "OpenBSD" or system == "NetBSD" or system == "Darwin" or system == "SunOS" or (system and system:match("^CYGWIN")) then
|
||||
if system then
|
||||
platform = "unix"
|
||||
elseif system and (system:match("^Windows") or system:match("^MINGW")) then
|
||||
else
|
||||
platform = "windows"
|
||||
else -- likely it's unix now
|
||||
platform = "unix"
|
||||
end
|
||||
|
||||
return platform
|
||||
|
|
Loading…
Reference in a new issue