-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Description
Description
When serving files through filebrowser on Windows platforms, downloading a folder with multi-level directory structure as a ZIP archive results in incorrect path separators in filenames. The ZIP files generated use backslashes \ instead of the forward slashes / required by the ZIP specification (section 4.4.17). Other archive formats may have the same issue.
This deviation from the standard may also be the cause of the issues reported in #3381 and #1768.
Expected behaviour
All directory separators in ZIP entries should use forward slashes /, and the folder structure within the compressed archive should be consistent with the original folder structure.
What is happening instead?
Directory separators appear as backslashes \, and the folder structure within the compressed archive is corrupted.
Additional context
The directory structure is:
E:\test
├── dir1
│ └── file1.txt
├── dir2
│ └── file2.txt
└── file.txt
The downloaded ZIP archive is:
How to reproduce?
- Serve a folder containing nested directories via filebrowser on Windows
- Download the folder as a ZIP archive through the web interface
- Inspect the ZIP file contents
Files
The ZIP file: test.zip