mirror of
https://github.com/koreader/koreader
synced 2024-11-18 03:25:46 +00:00
Fix: Updated legacy directory, which crashed the program (#10260)
Fixes #10259
This commit is contained in:
parent
91fc8a0061
commit
3a894f954c
@ -334,12 +334,14 @@ end
|
|||||||
function MyClipping:parseHistory()
|
function MyClipping:parseHistory()
|
||||||
local clippings = {}
|
local clippings = {}
|
||||||
local history_dir = DataStorage:getHistoryDir()
|
local history_dir = DataStorage:getHistoryDir()
|
||||||
for f in lfs.dir(history_dir) do
|
if lfs.attributes(history_dir, "mode") == "directory" then
|
||||||
local legacy_history_file = ffiutil.joinPath(history_dir, f)
|
for f in lfs.dir(history_dir) do
|
||||||
if lfs.attributes(legacy_history_file, "mode") == "file" then
|
local legacy_history_file = ffiutil.joinPath(history_dir, f)
|
||||||
local doc_file = DocSettings:getFileFromHistory(f)
|
if lfs.attributes(legacy_history_file, "mode") == "file" then
|
||||||
if doc_file then
|
local doc_file = DocSettings:getFileFromHistory(f)
|
||||||
self:parseHistoryFile(clippings, legacy_history_file, doc_file)
|
if doc_file then
|
||||||
|
self:parseHistoryFile(clippings, legacy_history_file, doc_file)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user