Skip to content

Commit

Permalink
Bug fix---make sure all error codes are consistent.
Browse files Browse the repository at this point in the history
  • Loading branch information
spc476 committed Oct 1, 2019
1 parent 32db03a commit 93d994e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions port70/readfile.lua
Expand Up @@ -93,7 +93,7 @@ return function(filename,ext)
if filename:match(ext) then
local file,err = io.open(filename,"r")
if not file then
return false,err
return false,'Not found'
end

local acc = {}
Expand Down Expand Up @@ -138,7 +138,7 @@ return function(filename,ext)
local file,err = io.open(filename,"r")
if not file then
syslog('error',"io.open(%q) = %s",filename,err)
return false,err
return false,'Not found'
end

local acc = {}
Expand All @@ -152,7 +152,7 @@ return function(filename,ext)
else
local file,err = io.open(filename,"rb")
if not file then
return false,err
return false,'Not found'
end

local data = file:read("*a")
Expand Down

0 comments on commit 93d994e

Please sign in to comment.