From cad8ddec92687fcd845ffe8acf474d18e4ef3f59 Mon Sep 17 00:00:00 2001 From: Qingping Hou Date: Thu, 22 Aug 2013 11:39:35 +0800 Subject: [PATCH] disable path compress on relative path --- frontend/ui/widget/filechooser.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/ui/widget/filechooser.lua b/frontend/ui/widget/filechooser.lua index fc17fd1fd..fe72d891c 100644 --- a/frontend/ui/widget/filechooser.lua +++ b/frontend/ui/widget/filechooser.lua @@ -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