mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
add datastorage module to handle data directory on various platform
On kindle, kobo and pocketbook the data directory is the current running directory but on Android the app is installed in system defined location and users may have no access to that location. The same circumstances should be true for the upcoming Koreader for Ubuntu touch, so the data directory (in which tessdata, dictionaries, global settings, persistant defaults and probably history data are stored) could be stored in another place.
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
|
||||
-- load default settings
|
||||
require "defaults"
|
||||
pcall(dofile, "defaults.persistent.lua")
|
||||
local DataStorage = require("datastorage")
|
||||
pcall(dofile, DataStorage:getDataDir() .. "/defaults.persistent.lua")
|
||||
|
||||
-- set search path for 'require()'
|
||||
package.path = "common/?.lua;rocks/share/lua/5.1/?.lua;frontend/?.lua;" .. package.path
|
||||
|
||||
Reference in New Issue
Block a user