aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2021-11-30 21:32:29 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2021-12-01 03:35:31 +0530
commit2aa5e2cc01b89a88eab2a6cfaee871e9addaf6a9 (patch)
treed7b899bd46d72baea07a6c8475841c1a63979401
parent1bad50eced921126ea6587d9ae99e98164da500b (diff)
downloadhypervideo-pre-2aa5e2cc01b89a88eab2a6cfaee871e9addaf6a9.tar.lz
hypervideo-pre-2aa5e2cc01b89a88eab2a6cfaee871e9addaf6a9.tar.xz
hypervideo-pre-2aa5e2cc01b89a88eab2a6cfaee871e9addaf6a9.zip
Ensure same config file is not loaded multiple times
-rw-r--r--yt_dlp/options.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/yt_dlp/options.py b/yt_dlp/options.py
index 7a8979273..d20f65e99 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