mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Version::getShortVersion: handle "rev" being empty (#9502)
In which case we reply "unknown" instead of an empty string ;).
This commit is contained in:
@@ -55,6 +55,7 @@ end
|
||||
function Version:getShortVersion()
|
||||
if not self.short then
|
||||
local rev = self:getCurrentRevision()
|
||||
if (not rev or rev == "") then return "unknown" end
|
||||
local year, month, point, revision = rev:match("v(%d%d%d%d)%.(%d%d)%.?(%d?%d?)-?(%d*)")
|
||||
self.short = year .. "." .. month
|
||||
if point and point ~= "" then
|
||||
|
||||
Reference in New Issue
Block a user