From ce6fb9175c104113396949f50364b0a49d69c9c6 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 14 Feb 2014 13:52:59 +0100 Subject: options: make --no-config block all auto-loaded configuration files Until now, the --no-config was explicitly checked in multiple places to suppress loading of config files. Add such a check to the config path code itself, and refuse to resolve _any_ configuration file locations if the option is set. osc.lua needs a small fixup, because it didn't handle the situation when no path was returned. There may some of such cases in the C code too, but I didn't find any on a quick look. --- player/lua/osc.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'player') diff --git a/player/lua/osc.lua b/player/lua/osc.lua index 5bf150274d..033f2c0d7e 100644 --- a/player/lua/osc.lua +++ b/player/lua/osc.lua @@ -121,7 +121,7 @@ function read_config(options, identifier) local conffilename = "plugin_" .. identifier .. ".conf" local conffile = mp.find_config_file(conffilename) - local f = io.open(conffile,"r") + local f = conffile and io.open(conffile,"r") if f == nil then -- config not found else -- cgit v1.2.3