From 2aa5e2cc01b89a88eab2a6cfaee871e9addaf6a9 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Tue, 30 Nov 2021 21:32:29 +0530 Subject: [PATCH] Ensure same config file is not loaded multiple times --- yt_dlp/options.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/yt_dlp/options.py b/yt_dlp/options.py index 7a8979273a..d20f65e99c 100644 --- a/yt_dlp/options.py +++ b/yt_dlp/options.py @@ -1619,6 +1619,9 @@ def parseOpts(overrideArguments=None): current_path = os.path.join(path, '%s.conf' % package) config = _readOptions(current_path, default=None) if config is not None: + current_path = os.path.realpath(current_path) + if current_path in paths.values(): + return False configs[name], paths[name] = config, current_path return parser.parse_args(config)[0].ignoreconfig return False