Check the file ending. Fixes #11.

This commit is contained in:
Olof Larsson 2013-07-27 09:44:08 +02:00
parent 2f75fbdb1d
commit fa59f9f6cd

View File

@ -102,7 +102,12 @@ public class MUtil
for (File playerfile : playerfiles)
{
String filename = playerfile.getName();
// Ensure it's actually a .dat player filefile
if (!filename.toLowerCase().endsWith(".dat")) continue;
String playername = filename.substring(0, filename.length()-4);
ret.add(playername);
}