mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
Ensure same config file is not loaded multiple times
This commit is contained in:
parent
1bad50eced
commit
2aa5e2cc01
1 changed files with 3 additions and 0 deletions
|
@ -1619,6 +1619,9 @@ def read_options(name, path, user=False):
|
||||||
current_path = os.path.join(path, '%s.conf' % package)
|
current_path = os.path.join(path, '%s.conf' % package)
|
||||||
config = _readOptions(current_path, default=None)
|
config = _readOptions(current_path, default=None)
|
||||||
if config is not 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
|
configs[name], paths[name] = config, current_path
|
||||||
return parser.parse_args(config)[0].ignoreconfig
|
return parser.parse_args(config)[0].ignoreconfig
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Reference in a new issue