[vlc-commits] luaHttp: Support drivelist for win32

Rob Jonson git at videolan.org
Fri Oct 14 00:27:29 CEST 2011


vlc | branch: master | Rob Jonson <rob at hobbyistsoftware.com> | Wed Sep 28 13:05:18 2011 +0100| [273a7a9c2195f49419bdfc16d1293e6336e97956] | committer: Jean-Baptiste Kempf

luaHttp: Support drivelist for win32

Close #3687
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=273a7a9c2195f49419bdfc16d1293e6336e97956
---

 share/lua/intf/modules/httprequests.lua |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/share/lua/intf/modules/httprequests.lua b/share/lua/intf/modules/httprequests.lua
index a22e833..b771175 100644
--- a/share/lua/intf/modules/httprequests.lua
+++ b/share/lua/intf/modules/httprequests.lua
@@ -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={}



More information about the vlc-commits mailing list