Skip to content

Bug report : Snapshot archive uses backslash as path separator on Windows, causing directory structure loss when extracting on Linux #132

Open

Description

@JerryHan3

Describe the bug
I was using the fabric mod to create a snapshot backup on my Windows computer, and then migrate the entire server to a Ubuntu server. After restoring it using the mod's CLI mode or the standard unzip command, all files are extracted with a backslash '\' in their filenames, and no directory structure is preserved.

I suspect why this happens is that the ZIP file stores entry paths using Windows-style backslashes. Tools on Linux treat the backslash as a literal character in the filename, so they do not create the intended nested directories.

To Reproduce
Steps to reproduce the behavior:

  1. Host a fabric server with this mod installed on Windows machine.
  2. Run /backup snapshot in-game or in console to create a snapshot backup.
  3. Transfer the entire fabric server to a Ubuntu machine.
  4. Use command java -jar ../mods/AdvancedBackups-fabric-1.21.2-3.7.1.jar, and follow instructions to restore the snapshot file created.
  5. Observe that all files appear in the world directory with '\' in their names, instead of being organized into folders.

Expected behavior
The ZIP archive should store paths using forward slashes '/', so that when extracted on Linux (and other Unix-like systems), the directory hierarchy is correctly recreated.

Screenshots

Corrupted file structure

Versioning (please complete the following information):

  • OS: Windows 11 -> Ubuntu 24.04.4
  • Minecraft Version(s): 1.21.4
  • Modloader(s): Fabric
  • Mod Version: 3.7.1

Additional context
N-A

Activity

  1. HeatherComputer commented on Jul 19, 2026

    @HeatherComputer
    Owner

    Now that's a wacky bug.

    Do you think you could check what happens if you extract the same zip file using standard linux commandline tools or guis?

  2. JerryHan3 commented on Jul 27, 2026

    @JerryHan3
    Author

    Well, that screenshot is taken from my server panel after i use unzip command on linux machine. So yes, extract it using linux standard tools, like unzip, will cause the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions