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 ...@@ -356,30 +356,19 @@ end
getbrowsetable = function () getbrowsetable = function ()
local dir = _GET["dir"] 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 result={} local result={}
--paths are returned as an array of elements
result.element={} result.element={}
result.element._array={} result.element._array={}
if dir then if dir then
if dir == "~" then dir = vlc.misc.homedir() end if dir == "~" then dir = vlc.misc.homedir() end
dir = common.realpath(dir.."/") dir = common.realpath(dir.."/")
local d = vlc.net.opendir(dir) local d = vlc.net.opendir(dir)
table.sort(d) table.sort(d)
--paths are returned as an array of elements
for _,f in pairs(d) do for _,f in pairs(d) do
if f == ".." or not string.match(f,"^%.") then if f == ".." or not string.match(f,"^%.") then
local df = common.realpath(dir..f) 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