fix bug in loading roms with no extension

This commit is contained in:
zeromus 2012-12-27 18:41:46 +00:00
parent fb14e1df1c
commit f3f6b72f5a
1 changed files with 26 additions and 24 deletions

View File

@ -523,7 +523,9 @@ namespace SevenZip
{
throw new ArgumentException("File name is null or empty string!");
}
string extension = Path.GetExtension(fileName).Substring(1);
string extension = Path.GetExtension(fileName);
if (extension.StartsWith("."))
extension = extension.Substring(1);
if (!InExtensionFormats.ContainsKey(extension) && reportErrors)
{
if (FileChecker.ThrowExceptions)