]> git.sesse.net Git - vlc/commitdiff
luaHttp: Support drivelist for win32
authorRob Jonson <rob@hobbyistsoftware.com>
Wed, 28 Sep 2011 12:05:18 +0000 (13:05 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 13 Oct 2011 22:26:18 +0000 (00:26 +0200)
Close #3687
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
share/lua/intf/modules/httprequests.lua

index a22e833c9b057038916fa9b4b136f8fdcf2402c1..b771175edc968dd684f55f1a59825cb24ac4f942 100644 (file)
@@ -346,6 +346,11 @@ getbrowsetable = function ()
                dir = _GET["dir"]
        end
 
+       --backwards compatibility with old format driveLetter:\\..
+       --this is forgiving with the slash type and number
+       local position=string.find(dir, '%a:[\\/]*%.%.',0)
+       if position==1 then dir="" end
+
        local result={}
        --paths are returned as an array of elements
        result.element={}