-
Notifications
You must be signed in to change notification settings - Fork 338
Description
Describe the bug
When editing a version, dropping a folder into the Files section adds the folder as a 0-byte file. This causes the version creation to fail.
This issue can also be experienced when directly dropping a folder into the Versions tab of a project.
After further research, this issue can also be reproduced by overriding the suggested file types in the file picker when uploading a version file. Therefore, the core of this issue seems to be that the frontend relies on the filetype hint being respected to avoid undefined behaviour.
Steps to reproduce
- Go to the Versions tab of a project that you own
- Drag a folder from your file manager into Modrinth
Expected behavior
An error would be shown explaining that only files, not folders, can be uploaded. Alternatively, the drag-and-drop operation would be ignored.
Additional context
Since resource packs and datapacks function as folders, users may try to drag folders into Modrinth to add them to a version. Perhaps there should be a message explaining that such packs need to be distributed as a zip.
System information:
- Zorin OS 16.2 x86_64
- GNOME Shell 3.38.4 (X11)
Everything is a file in Unix