Fixed platform detection on Windows (refs #74)

This commit is contained in:
Timo Smit 2017-02-14 13:23:14 +01:00
parent 74f761f39e
commit 935f71d4ab

View file

@ -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