WorldGuard

WorldGuard

8M Downloads

World configuration files (re)written in DOS format

SlimeDog opened this issue ยท 3 comments

commented

Versions

WorldEdit version: 7.3.0-SNAPSHOT+5678-913d4d6

WorldGuard version: 7.0.5-SNAPSHOT+2107-528ba32

Platform version:

>version
[22:50:46] [Server thread/INFO]: This server is running CraftBukkit version 3018-Spigot-db99f82-a021e33 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)
[22:50:46] [Server thread/INFO]: You are running the latest version

OS: CentOS Linux release 7.9.2009 (Core)
Java:

java version "11.0.10" 2021-01-19 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.10+8-LTS-162)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.10+8-LTS-162, mixed mode)

Describe the bug
plugins/WorldGuard/worlds/*/config.yml are rewritten on every server start, in DOS format, even though on a Linux system.

  • Why are they rewritten, given that the content does not change?
  • Why are they written in DOS format, rather than the native file format of the OS?

To Reproduce

  • Stop server
  • dos2unix WorldGuard/worlds/*/config.yml
  • Start server
  • Verify that files have been rewritten in DOS format

Expected behavior
Even if files need to be rewritten on every server start (unclear why this is necessary) they should be written in the native file format of the operating system.

commented

is there an actual bug here? I'm fairly sure this is handled entirely by bukkit's yaml lib and it probably keeps CRLF since our header comments are for compatibility. I'm not aware of any issues with CRLF on linux so I'm not going to bother to add special handling to convert.

commented

Certainly not a major issue. However, this is the only plugin (of 170 we employ on our plugin test servers) that writes files in DOS format, of the 46 that rewrite configuration files on server start. And it's only the header comments. The substantive content does not contain CRLF.

Obviously, your call.

commented

k, as mentioned not gonna bother with this then unless someone else wants to contribute a clean "fix" for a nonissue.