mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
datastorage: add support for isolating data
Use the `KO_HOME` environment variable if set to determine the data directory location.
This commit is contained in:
committed by
Frans de Jonge
parent
f5c6b56899
commit
76837c66a7
@@ -10,7 +10,9 @@ local full_data_dir
|
||||
function DataStorage:getDataDir()
|
||||
if data_dir then return data_dir end
|
||||
|
||||
if isAndroid then
|
||||
if os.getenv("KO_HOME") then
|
||||
data_dir = os.getenv("KO_HOME")
|
||||
elseif isAndroid then
|
||||
data_dir = android.getExternalStoragePath() .. "/koreader"
|
||||
elseif os.getenv("UBUNTU_APPLICATION_ISOLATION") then
|
||||
local app_id = os.getenv("APP_ID")
|
||||
|
||||
Reference in New Issue
Block a user