Some security issue found in scan.
This commit is contained in:
parent
70cc163cb0
commit
44c2af88ea
1 changed files with 3 additions and 6 deletions
|
@ -403,20 +403,17 @@ namespace API.Parser
|
|||
|
||||
public static bool IsArchive(string filePath)
|
||||
{
|
||||
var fileInfo = new FileInfo(filePath);
|
||||
return MangaFileRegex.IsMatch(fileInfo.Extension);
|
||||
return MangaFileRegex.IsMatch(Path.GetExtension(filePath));
|
||||
}
|
||||
|
||||
public static bool IsImage(string filePath)
|
||||
{
|
||||
var fileInfo = new FileInfo(filePath);
|
||||
return ImageRegex.IsMatch(fileInfo.Extension);
|
||||
return ImageRegex.IsMatch(Path.GetExtension(filePath));
|
||||
}
|
||||
|
||||
public static bool IsXml(string filePath)
|
||||
{
|
||||
var fileInfo = new FileInfo(filePath);
|
||||
return XmlRegex.IsMatch(fileInfo.Extension);
|
||||
return XmlRegex.IsMatch(Path.GetExtension(filePath));
|
||||
}
|
||||
|
||||
public static float MinimumNumberFromRange(string range)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue