From 438ffb16155217a229128d3ad266d8320aba69ed Mon Sep 17 00:00:00 2001 From: Pixel Date: Thu, 7 Jan 2010 11:22:59 -0800 Subject: Hexview shouldn't try working on a file without size. --- iupe-hexview.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/iupe-hexview.lua b/iupe-hexview.lua index a6817d9..9928e76 100644 --- a/iupe-hexview.lua +++ b/iupe-hexview.lua @@ -407,7 +407,9 @@ iupep.hexview = { updatehandle = function (self, handle) self.handle = handle - self.filesize = handle and handle:getsize() or 0 + local filesize = handle and handle:getsize() or 0 + if filesize < 0 then self.handle = nil filesize = 0 end + self.filesize = filesize self.old_max_bytes = -1 self.old_filecursor = -1 self:updatescrollbar() -- cgit v1.2.3