NewsDownloader: Remove NewsDownloader files from history (#3424)

This commit is contained in:
mwoz123
2017-10-27 23:00:49 +02:00
committed by Frans de Jonge
parent 9000ed1bd3
commit 424593ca7c
2 changed files with 27 additions and 1 deletions

View File

@@ -5,6 +5,8 @@ local lfs = require("libs/libkoreader-lfs")
local DataStorage = {}
local data_dir
local full_data_dir
function DataStorage:getDataDir()
if data_dir then return data_dir end
@@ -33,6 +35,19 @@ function DataStorage:getSettingsDir()
return self:getDataDir() .. "/settings"
end
function DataStorage:getFullDataDir()
if full_data_dir then return full_data_dir end
if string.sub(self:getDataDir(), 1, 1) == "/" then
full_data_dir = self:getDataDir()
elseif self:getDataDir() == "." then
full_data_dir = lfs.currentdir()
end
return full_data_dir
end
local function initDataDir()
local sub_data_dirs = {
"cache", "clipboard",