From 44c077024731a7bfb6897c3d5cb8462cdcc99e24 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 3 Jan 2015 14:48:33 +0100 Subject: TOOLS/lua/autoload: fix behavior with network URLs readdir() fails if the directory is an URL, so just exit instead of letting the Lua script fail. --- TOOLS/lua/autoload.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/TOOLS/lua/autoload.lua b/TOOLS/lua/autoload.lua index 049af868c0..433b2138d7 100644 --- a/TOOLS/lua/autoload.lua +++ b/TOOLS/lua/autoload.lua @@ -25,6 +25,9 @@ function find_and_add_entries() return end local files = mputils.readdir(dir, "files") + if files == nil then + return + end table.sort(files) if dir == "." then dir = "" -- cgit v1.2.3