[fix] Empty directory path and crash on TextWidget#5606
[fix] Empty directory path and crash on TextWidget#5606Frenzie merged 5 commits intokoreader:masterfrom
Conversation
|
@robert00s just a quick note. We added something this weekend #5598 (comment) - so TextWidget will crash (on the emulator only) when it doesn't get a string for --- a/frontend/ui/widget/bookstatuswidget.lua
+++ b/frontend/ui/widget/bookstatuswidget.lua
@@ -138,5 +138,5 @@ end
function BookStatusWidget:getStatDays()
if stats_book.days then
- return stats_book.days
+ return tostring(stats_book.days)
else
return _("N/A")(feel free to add this quick one to this PR). |
|
@poire-z |
|
Ok, I found crash on ReadingProgress. PR soon. |
|
(Just pointing another one I found - not opening another PR, if you can add it here, hope that's ok :) --- a/frontend/apps/reader/skimtowidget.lua
+++ b/frontend/apps/reader/skimtowidget.lua
@@ -187,3 +187,3 @@ function SkimToWidget:init()
self.current_page_text = Button:new{
- text = self.curr_page,
+ text = tostring(self.curr_page),
bordersize = 0, |
|
Thanks, and sorry, another one in that same file: --- a/frontend/apps/reader/skimtowidget.lua
+++ b/frontend/apps/reader/skimtowidget.lua
@@ -367,3 +367,3 @@ function SkimToWidget:update()
self.progress_bar.percentage = self.curr_page / self.page_count
- self.current_page_text:setText(self.curr_page, self.current_page_text.width)
+ self.current_page_text:setText(tostring(self.curr_page), self.current_page_text.width)
end |
|
No problem :) |
PR fix prevent empty path in filemanager.
Step to reproduce:
/home/koreader/testas home folder in KOShorten home directory(Other settings -> Shorten home directory)/home/koreader/test1