Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-19992

Minecraft server stores player data in case sensitive filename

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: Minecraft 1.5.2, Minecraft 1.6.1, Minecraft 1.6.2
    • Fix Version/s: Minecraft 1.7.10
    • Labels:
    • Environment:
      Linux
    • Confirmation Status:
      Unconfirmed

      Description

      Minecraft server appears to presume a case-insensitive filesystem (Windows, most OSX)

      For player data storage on Linux, this has the following observed effects in the /<worldname>/players/ directory where the <player>.dat files are stored:

      • for offline players, name Foo is distinct from foo and are thus separate players.
      • for players with a Mojang account, account name Bar as example: somewhere the server lowercases the name before save so it stores bar.dat, but most of the time it uses Bar.dat - this is indicated by the fact that both are created but Bar.dat tends to have the most recent timestamp.

      My suggestion for fixing all this, without breaking existing environments (presuming only the two above behaviour patterns exist, I am not aware of others)....
      logic flow (in pseudocode) as follows:

      On login
      if exists (Bar.dat)

      { read Bar.dat write bar.dat delete Bar.dat }

      else if exists (bar.dat)

      { read bar.dat }

      ...
      always write bar.dat

      So after transition, the server always uses lowercase(name) for filesystem operations.
      This should provide a safe transition.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              agl Arjen Lentz
            • Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: