diff --git a/frontend/ui/widget/filechooser.lua b/frontend/ui/widget/filechooser.lua index 5fbb32f27..ecf59332f 100644 --- a/frontend/ui/widget/filechooser.lua +++ b/frontend/ui/widget/filechooser.lua @@ -15,20 +15,6 @@ function FileChooser:init() Menu.init(self) -- call parent's init() end -function FileChooser:compressPath(path) - local pos - if path:sub(1, 1) ~= "/" then - -- currently does not work with relative paths - return path - end - path = path:gsub("/+", "/") - -- compress paths like "test/pdf/../epub" into "test/epub" - repeat - path, pos = path:gsub("/?[^/]*/%.%.", "", 1) - until pos == 0 - return path ~= "" and path or "/" -end - function FileChooser:genItemTableFromPath(path) local dirs = {} local files = {} @@ -64,7 +50,7 @@ function FileChooser:genItemTableFromPath(path) end function FileChooser:changeToPath(path) - path = self:compressPath(path) + path = util.realpath(path) self.path = path self:swithItemTable(nil, self:genItemTableFromPath(path)) end diff --git a/koreader-base b/koreader-base index bc556f656..6f8eaead5 160000 --- a/koreader-base +++ b/koreader-base @@ -1 +1 @@ -Subproject commit bc556f656b0a0f3ca211d7000ea99ec04d947494 +Subproject commit 6f8eaead566351b3086bc7f368d57d590c1d3001