Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove File extension check that only causes failure. #1716

Merged
merged 1 commit into from May 8, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 0 additions & 9 deletions MonoGame.Framework/Content/ContentTypeReader.cs
Expand Up @@ -114,12 +114,6 @@ internal static string Normalize(string fileName, string[] extensions)
if (files.Any(s => s == file)) if (files.Any(s => s == file))
return fileName; return fileName;


// Check the file extension
if (!string.IsNullOrEmpty(Path.GetExtension(fileName)))
{
return null;
}

// FirstOrDefault returns null as the default if the file is not found. This crashed Path.Combine so check // FirstOrDefault returns null as the default if the file is not found. This crashed Path.Combine so check
// for it first. // for it first.
string file2 = files.FirstOrDefault(s => extensions.Any(ext => s.ToLower() == (file.ToLower() + ext))); string file2 = files.FirstOrDefault(s => extensions.Any(ext => s.ToLower() == (file.ToLower() + ext)));
Expand All @@ -137,9 +131,6 @@ public static string Normalize(string fileName, string[] extensions)
if (File.Exists(fileName)) if (File.Exists(fileName))
return fileName; return fileName;
#endif #endif
// Check the file extension
if (!string.IsNullOrEmpty(Path.GetExtension(fileName)))
return null;


foreach (string ext in extensions) foreach (string ext in extensions)
{ {
Expand Down