mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
A random assortment of fixes (#9513)
* Android: Make sure sdcv can find the STL * DocCache: Be less greedy when serializing to disk, and only do that for the *current* document ;). * CanvasContext: Explicitly document API quirks. * Fontlist: Switch the on-disk Persist format to zstd (it's ever so slightly faster). * Bump base for https://github.com/koreader/koreader-base/pull/1515 (fix #9506)
This commit is contained in:
@@ -16,6 +16,8 @@ local NetworkMgr = require("ui/network/manager")
|
||||
local SortWidget = require("ui/widget/sortwidget")
|
||||
local Trapper = require("ui/trapper")
|
||||
local UIManager = require("ui/uimanager")
|
||||
local ffi = require("ffi")
|
||||
local C = ffi.C
|
||||
local ffiUtil = require("ffi/util")
|
||||
local logger = require("logger")
|
||||
local time = require("ui/time")
|
||||
@@ -770,7 +772,16 @@ function ReaderDictionary:rawSdcv(words, dict_names, fuzzy_search, lookup_progre
|
||||
-- definition found, sdcv will output some message on stderr, and
|
||||
-- let stdout empty) by appending an "echo":
|
||||
cmd = cmd .. "; echo"
|
||||
-- NOTE: Bionic doesn't support rpath, but does honor LD_LIBRARY_PATH...
|
||||
-- Give it a shove so it can actually find the STL.
|
||||
if Device:isAndroid() then
|
||||
C.setenv("LD_LIBRARY_PATH", "./libs", 1)
|
||||
end
|
||||
local completed, results_str = Trapper:dismissablePopen(cmd, lookup_progress_msg)
|
||||
if Device:isAndroid() then
|
||||
-- NOTE: It's unset by default, so this is perfectly fine.
|
||||
C.unsetenv("LD_LIBRARY_PATH")
|
||||
end
|
||||
lookup_cancelled = not completed
|
||||
if results_str and results_str ~= "\n" then -- \n is when lookup was cancelled
|
||||
-- sdcv can return multiple results if we passed multiple words to
|
||||
|
||||
Reference in New Issue
Block a user