]> git.sesse.net Git - vlc/commitdiff
revert previous attempt to make browse handle uri and path in the dir param
authorRob Jonson <rob@hobbyistsoftware.com>
Sun, 25 Sep 2011 22:08:05 +0000 (23:08 +0100)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 26 Sep 2011 14:56:01 +0000 (17:56 +0300)
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
share/lua/intf/modules/httprequests.lua

index 131f164db100f7a9587744bbe0526007a9666d37..74d1a68bee6a957ac8494da85eeb04e10ca2496d 100644 (file)
@@ -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)