]> git.sesse.net Git - vlc/commitdiff
avoid crash where vlc.net.stat returns nil for a file (such as alias on mac os)
authorRob Jonson <rob@hobbyistsoftware.com>
Sat, 25 Feb 2012 13:55:21 +0000 (13:55 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 27 Feb 2012 11:36:35 +0000 (12:36 +0100)
resending with spaces instead of tabs for indenting.
please backport for 2.0.1

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
share/lua/intf/modules/httprequests.lua

index 262f61818734d07c6009a2c02a37dc29207120f3..52f35317afa05b13e6f19b1b7aa87cfa3a2a4a0c 100644 (file)
@@ -396,8 +396,12 @@ getbrowsetable = function ()
                 local path, name =  df, f
                 local element={}
 
-                for k,v in pairs(s) do
-                    element[k]=v
+                if (s) then
+                    for k,v in pairs(s) do
+                        element[k]=v
+                    end
+                else
+                    element["type"]="unknown"
                 end
                 element["path"]=path
                 element["name"]=name