Skip to content

Commit

Permalink
Fixes extension case detection - #226
Browse files Browse the repository at this point in the history
  • Loading branch information
Asnivor committed Dec 4, 2018
1 parent 630261f commit 5a34e62
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion BuildTools/ChangeLog/default.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ title: Changelog
* (Enhancement) - Added compatibility for mednafen v1.21.2 and v1.21.3 ([214](https://github.com/Asnivor/MedLaunch/issues/214))
* (BugFix) - Mitigated TimeSpan overflow exception ([215](https://github.com/Asnivor/MedLaunch/issues/215))
* (Enhancement) - Background picture can now be hidden (Opacity set to 0) ([220](https://github.com/Asnivor/MedLaunch/issues/220))
* (BugFix) - Remove unneccesary dashes generated at the start of a launch string if user is running an older version of mednafen (or emu4crt.exe renamed to mednafen.exe)
* (BugFix) - Remove unneccesary dashes generated at the start of a launch string if user is running an older version of mednafen (or emu4crt.exe renamed to mednafen.exe) ([222](https://github.com/Asnivor/MedLaunch/issues/222))
* (BugFix) - Enable case-agnostic file extension scanning ([226](https://github.com/Asnivor/MedLaunch/issues/226))

##### [0.5.25.3](https://medlaunch.info/releases/0-5-25-x)
###### 2018-03-22
Expand Down
8 changes: 4 additions & 4 deletions MedLaunch/Classes/Scanning/RomScan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public void BeginRomImport(int _systemId, ProgressDialogController _dialog)
{
foreach (string p in romFiles)
{
if (p.EndsWith(s))
if (p.ToUpper().EndsWith(s.ToUpper()))
{
//MessageBoxResult result5 = MessageBox.Show(p);
allowedFiles.Add(p);
Expand Down Expand Up @@ -128,7 +128,7 @@ public void ProcessFile(string file)
string hash = String.Empty;

// inspect archive files
if (extension == ".zip" || extension == ".7z")
if (extension.ToLower() == ".zip" || extension.ToLower() == ".7z")
{
//bool isAllowed = false;
try
Expand All @@ -151,15 +151,15 @@ public void ProcessFile(string file)
// no allowed files
return;
}
else if (alcnt == 1 && extension == ".zip")
else if (alcnt == 1 && extension.ToLower() == ".zip")
{
// 1 allowed file and 1 total files in a zip file - use the zip file rather than the embedded rom
var result = results.Results.FirstOrDefault();

if (result == null)
return;

if (result.Extension == ".zip" || result.Extension == ".7z")
if (result.Extension.ToLower() == ".zip" || result.Extension.ToLower() == ".7z")
return;

//ArchiveFiles.Add(a);
Expand Down

0 comments on commit 5a34e62

Please sign in to comment.