Update settings.lua
This commit is contained in:
parent
2265ec075a
commit
aced2112e6
1 changed files with 2 additions and 2 deletions
|
@ -52,7 +52,7 @@ local function changePassword()
|
||||||
term.setTextColor(colors.black)
|
term.setTextColor(colors.black)
|
||||||
local password = read("*")
|
local password = read("*")
|
||||||
term.redirect(sPhone.mainTerm)
|
term.redirect(sPhone.mainTerm)
|
||||||
local fpw = fs.open("/.sPhone/.password","r")
|
local fpw = fs.open("/.sPhone/config/.password","r")
|
||||||
if sha256.sha256(password) ~= fpw.readLine() then
|
if sha256.sha256(password) ~= fpw.readLine() then
|
||||||
sPhone.wrongPassword = true
|
sPhone.wrongPassword = true
|
||||||
else
|
else
|
||||||
|
@ -115,7 +115,7 @@ local function changePassword()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if not sPhone.wrongPassword then
|
if not sPhone.wrongPassword then
|
||||||
local f = fs.open("/.sPhone/.password","w")
|
local f = fs.open("/.sPhone/config/.password","w")
|
||||||
f.write(sha256.sha256(pwChangeRep))
|
f.write(sha256.sha256(pwChangeRep))
|
||||||
f.close()
|
f.close()
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue