Skip to content

Commit

Permalink
Fix for #94
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcos Vives Del Sol committed May 23, 2014
1 parent 1373b16 commit c24bad1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/com/daemitus/deadbolt/PlayerNameUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,13 @@ public static long getLastPlayed(String playerName) {

protected synchronized static void populateCaseInsensitiveNameToCaseCorrectName()
{
// Check if listFiles returns null (ie folder does not exist)
File[] files = playerfolder.listFiles();
if (files == null) {
return;
}
// Populate by removing .dat
for (File playerfile : playerfolder.listFiles())
for (File playerfile : files)
{
String filename = playerfile.getName();
String playername = filename.substring(0, filename.length()-4);
Expand Down

0 comments on commit c24bad1

Please sign in to comment.