Skip to content

Illegal file detected doesn't indicate the filename and path #2966

@brothanb

Description

@brothanb

WorldEdit Version

7.4.3

Platform Version

Paper version 26.1.2-63-main@711c5de (2026-05-11T08:20:02Z) (Implementing API version 26.1.2.build.63-stable)

Confirmations

  • I am using the most recent Minecraft release.
  • I am using a version of WorldEdit compatible with my Minecraft version.
  • I am using the latest or recommended version of my platform software.
  • I am NOT using a hybrid server, e.g. a server that combines Bukkit and Forge. Examples include Arclight, Mohist, and Cardboard.
  • I am NOT using a fork of WorldEdit, such as FastAsyncWorldEdit (FAWE) or AsyncWorldEdit (AWE)

Bug Description

The "Illegal file detected" warning message prints a stack trace, but does not indicate which is the offending file without debug logging enabled at the server level.

[12:31:33 INFO]: [WorldEdit] Enabling WorldEdit v7.4.3+7515-78babeb [12:31:33 INFO]: Registering commands with com.sk89q.worldedit.bukkit.BukkitServerInterface [12:31:33 WARN]: Illegal file detected com.sk89q.worldedit.util.io.file.InvalidFilenameException: Invalid characters or extension missing at worldedit-bukkit-7.4.3.jar//com.sk89q.worldedit.WorldEdit.getSafeFileWithExtensions(WorldEdit.java:385) ~[?:?] at worldedit-bukkit-7.4.3.jar//com.sk89q.worldedit.WorldEdit.getSafeFile(WorldEdit.java:338) ~[?:?] at worldedit-bukkit-7.4.3.jar//com.sk89q.worldedit.WorldEdit.getSafeOpenFile(WorldEdit.java:304) ~[?:?] at worldedit-bukkit-7.4.3.jar//com.sk89q.worldedit.internal.util.RecursiveDirectoryWatcher.triggerInitialEvents(RecursiveDirectoryWatcher.java:126) ~[?:?] at worldedit-bukkit-7.4.3.jar//com.sk89q.worldedit.internal.util.RecursiveDirectoryWatcher.lambda$start$0(RecursiveDirectoryWatcher.java:164) ~[?:?] at java.base/java.lang.Thread.run(Thread.java:1474) ~[?:?]

Expected Behavior

The warning message should include the offending path and filename to aid in locating the offending file. i.e..
[12:31:33 WARN]: Illegal file detected - Invalid characters or extension missing - schematics/runnigndragon (2).schem

Reproduction Steps

  1. Place schematic with illegal filename in schematics directory
  2. Start Server
  3. Check log/console

Anything Else?

I was able to reproduce the error with just the WorldEdit plugin installed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:pendingPending acceptance or closure.type:bugIncorrect behavior, not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions