mirror of
https://github.com/etlegacy/wolfadmin.git
synced 2024-11-25 05:31:41 +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()
|
function settings.determineOS()
|
||||||
local system = io.popen("uname -s"):read("*l")
|
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"
|
platform = "unix"
|
||||||
elseif system and (system:match("^Windows") or system:match("^MINGW")) then
|
else
|
||||||
platform = "windows"
|
platform = "windows"
|
||||||
else -- likely it's unix now
|
|
||||||
platform = "unix"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return platform
|
return platform
|
||||||
|
|
Loading…
Reference in a new issue