mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
PocketBook: make canAssociateFileExtensions always return true (#8729)
This change drops the #koreader signature check. This check prevents KOReader from modifying associations if something else has changed the file without putting a verbatim "#koreader" string back. While this prevents KOReader from interfering with another application or the system trying to own the file, it also leads to hard to diagnose issues, when the user can inadvertently change associations without realising they’re doing so, and being unable to return back.
This commit is contained in:
@@ -34,6 +34,7 @@ local PocketBook = Generic:new{
|
||||
canPowerOff = yes,
|
||||
needsScreenRefreshAfterResume = no,
|
||||
home_dir = "/mnt/ext1",
|
||||
canAssociateFileExtensions = yes,
|
||||
|
||||
-- all devices that have warmth lights use inkview api
|
||||
hasNaturalLightApi = yes,
|
||||
@@ -286,18 +287,6 @@ function PocketBook:setDateTime(year, month, day, hour, min, sec)
|
||||
end
|
||||
end
|
||||
|
||||
-- Predicate, so no self
|
||||
function PocketBook.canAssociateFileExtensions()
|
||||
local f = io.open(ext_path, "r")
|
||||
if not f then return true end
|
||||
local l = f:read("*line")
|
||||
f:close()
|
||||
if l and not l:match("^#koreader") then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
function PocketBook:associateFileExtensions(assoc)
|
||||
-- First load the system-wide table, from which we'll snoop file types and icons
|
||||
local info = {}
|
||||
|
||||
Reference in New Issue
Block a user