From 3f85092ffe977fa5f0e729b2924d24bbf8c4e221 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 3 Jan 2015 14:48:33 +0100 Subject: [PATCH] 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 = ""