pmmp / leveldb

A minimalist fork of LevelDB compatible with ZLIB- and ZSTD-compressed DBs produced by Minecraft: Bedrock Edition
BSD 3-Clause "New" or "Revised" License
14 stars 2 forks source link

CURRENT file does not end with newline #3

Open xerenahmed opened 3 years ago

xerenahmed commented 3 years ago

I think if it works in minecraft vanilla, it should also work in pmmp

Could not load world "lobby": Corruption detected: Corruption: CURRENT file does not end with newline
dktapps commented 3 years ago

thanks for the total lack of reproducing information ...

dktapps commented 3 years ago

For posterity: It appears this problem comes from use of Git for world version management by Marketplace map creators without proper .gitattributes. This results in the CURRENT file being normalized to CRLF on Windows, since Git recognizes it as a text file.

Technically this is not a bug in leveldb, but Mojang have accommodated CRLF as well as LF in CURRENT, so it seems that we have no choice but to follow suit.