mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
disable path compress on relative path
This commit is contained in:
@@ -16,6 +16,11 @@ function FileChooser:init()
|
||||
end
|
||||
|
||||
function FileChooser:compressPath(item_path)
|
||||
if (item_path:sub(1, 1) == ".") then
|
||||
-- ignore relative path
|
||||
return item_path
|
||||
end
|
||||
|
||||
-- compress paths like "test/pdf/../epub" into "test/epub"
|
||||
local path = item_path
|
||||
while path:match("/[^/]+[/][\\.][\\.]") do
|
||||
|
||||
Reference in New Issue
Block a user