Commit 1c7bedae authored by Rob Jonson's avatar Rob Jonson Committed by Rémi Denis-Courmont

revert previous attempt to make browse handle uri and path in the dir param

Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent 454d3de2
......@@ -356,30 +356,19 @@ end
getbrowsetable = function ()
local dir = _GET["dir"]
if dir == nil then dir = "" end
--allow browse to deal with file-style URI's as well as paths
local start=string.sub(dir,0,8)
if start=="file:///" then
dir= string.sub(dir,9)
end
local dir = _GET["dir"]
local result={}
--paths are returned as an array of elements
result.element={}
result.element._array={}
if dir then
if dir == "~" then dir = vlc.misc.homedir() end
dir = common.realpath(dir.."/")
local d = vlc.net.opendir(dir)
table.sort(d)
--paths are returned as an array of elements
for _,f in pairs(d) do
if f == ".." or not string.match(f,"^%.") then
local df = common.realpath(dir..f)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment