YoutubeDLSharp icon indicating copy to clipboard operation
YoutubeDLSharp copied to clipboard

LoadConfigFile doesn't close double quotes if string ends with double quote.

Open nightshadow92 opened this issue 1 year ago • 0 comments

When a configuration file is loaded with a setting that ends with a ", it does not add a closing double quote at the end, causing an incomplete setting.

Example:

Contents of yt-dlp.conf:

--replace-in-metadata title "&" "_"
OptionSet options = OptionSet.LoadConfigFile(@"C:\yt-dlp.conf");
Console.WriteLine(options.ReplaceInMetadata.Values[0]);

Observed Behavior:

The ReplaceInMetadata value is parsed as title "&" "_.

Expected Behavior:

The ReplaceInMetadata value should be parsed correctly, ensuring all quotes are closed properly.

nightshadow92 avatar Jan 20 '25 15:01 nightshadow92