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.
reviewable/pr8741/r2
Andrej Shadura 2 years ago committed by GitHub
parent b924f38dc0
commit f3ac95321b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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 = {}

Loading…
Cancel
Save