gluon-core: sysconfig: differentiate between nil and empty string

This commit is contained in:
Matthias Schiffer 2015-01-26 20:18:33 +01:00
parent 29add3169b
commit 7fd3477263
1 changed files with 3 additions and 3 deletions

View File

@ -1,13 +1,13 @@
local sysconfigdir = '/lib/gluon/core/sysconfig/'
local function get(_, name)
local ret = nil
local f = io.open(sysconfigdir .. name)
if f then
ret = f:read('*line')
local ret = f:read('*line')
f:close()
return (ret or '')
end
return ret
return nil
end
local function set(_, name, val)