Skip to content

Commit

Permalink
Merge pull request #95 from socram8888/master
Browse files Browse the repository at this point in the history
Fix for #94
  • Loading branch information
md-5 committed May 24, 2014
2 parents 1373b16 + c24bad1 commit 00de76f
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 00de76f

Please sign in to comment.