mirror of
https://github.com/etlegacy/wolfadmin.git
synced 2024-11-24 21:21:56 +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,15 +90,14 @@ end
|
|||
|
||||
function settings.determineOS()
|
||||
local system = io.popen("uname -s"):read("*l")
|
||||
|
||||
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
|
||||
local platform
|
||||
|
||||
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
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue