Fixed build warnings related to ModuleMessage component changes

This commit is contained in:
Shaun Walker
2020-10-05 09:11:47 -04:00
parent ece8f3a57e
commit 0c0916c6ab
7 changed files with 50 additions and 48 deletions

View File

@ -326,7 +326,8 @@ namespace Oqtane.Shared
public static bool IsPathOrFileValid(this string name)
{
return (name.IndexOfAny(Constants.InvalidFileNameChars) == -1 &&
return (name != null &&
name.IndexOfAny(Constants.InvalidFileNameChars) == -1 &&
!Constants.InvalidFileNameEndingChars.Any(name.EndsWith) &&
!Constants.ReservedDevices.Split(',').Contains(name.ToUpper().Split('.')[0]));
}