Prevent NullRef in ContainsInvalidPathChars

(cherry picked from commit 5f7217844533907d7fc6287a48efb31987736c4c)
pull/1810/head
Mark McDowall 10 months ago committed by Bogdan
parent c93d6cff63
commit 0bfb557470

@ -158,6 +158,11 @@ namespace NzbDrone.Common.Extensions
public static bool ContainsInvalidPathChars(this string text)
{
if (text.IsNullOrWhiteSpace())
{
throw new ArgumentNullException("text");
}
return text.IndexOfAny(Path.GetInvalidPathChars()) >= 0;
}

Loading…
Cancel
Save