mirror of
https://github.com/kepler155c/opus
synced 2025-01-03 20:30:28 +00:00
minor fixes for user errors
This commit is contained in:
parent
5c35a8383e
commit
fba2d48a4b
@ -19,6 +19,9 @@ function linkfs.mount(_, source)
|
|||||||
error('Source is required')
|
error('Source is required')
|
||||||
end
|
end
|
||||||
source = fs.combine(source, '')
|
source = fs.combine(source, '')
|
||||||
|
if not fs.exists(source) then
|
||||||
|
error('Source is missing')
|
||||||
|
end
|
||||||
if fs.isDir(source) then
|
if fs.isDir(source) then
|
||||||
return {
|
return {
|
||||||
source = source,
|
source = source,
|
||||||
|
@ -152,7 +152,7 @@ function Canvas:write(x, y, text, bg, fg)
|
|||||||
bg = _rep(self.palette[bg], #text)
|
bg = _rep(self.palette[bg], #text)
|
||||||
end
|
end
|
||||||
if fg then
|
if fg then
|
||||||
fg = _rep(self.palette[fg], #text)
|
fg = _rep(self.palette[fg] or self.palette[1], #text)
|
||||||
end
|
end
|
||||||
self:blit(x, y, text, bg, fg)
|
self:blit(x, y, text, bg, fg)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user