Skip to content

Commit

Permalink
Fix Image loading from file with mono 4.9
Browse files Browse the repository at this point in the history
Apply dbe0dfe for all platforms.
Mono uses referencesource impl since mono/mono#4042, which does
not allow pathed search patterns in directory file lookups.
  • Loading branch information
sevoku committed Dec 16, 2016
1 parent 5fd09e7 commit 07a2140
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Xwt/Xwt.Drawing/Image.cs
Expand Up @@ -1054,9 +1054,7 @@ public override IEnumerable<string> GetAlternativeFiles (string fileName, string
yield return fn;
}
} else {
if (Path.DirectorySeparatorChar == '\\') // windows)
baseName = Path.GetFileName (baseName);
var files = Directory.GetFiles (Path.GetDirectoryName (fileName), baseName + "*" + ext);
var files = Directory.GetFiles (Path.GetDirectoryName (fileName), Path.GetFileName (baseName) + "*" + ext);
foreach (var f in files)
yield return f;
}
Expand Down

0 comments on commit 07a2140

Please sign in to comment.