Skip to content

Automatically detect incorrect file naming and prevent download attempts #281

@JoaGamo

Description

@JoaGamo

Is your feature request related to a problem? Please describe.
The docs mention that each game should follow the naming convention, which is fine, but neither the client or the server can tell if it's wrong. I had this problem where some games won't download and there was no logs nowhere as to why the download was not starting, it was because I used ":" in the game's name and the client simply refused to download.

Describe the solution you'd like
Automatic detection of characters that should not be there (like ":", "><" "?" "/" or incorrect file names like "CON", "NUL", etc), and the download button disabled until this is fixed by the administrator. Alternatively, the download button should display an error box when it's clicked, warning the user that the admin didn't name it correctly and that until the admin renames it, the game can't be downloaded.

Describe alternatives you've considered
An alternative solution would be automatically fixing this problem without admin intervention (without the admin manually changing the name again)
An example could be, for each case:
If forbiddenCharacter, replace with "-" ("-" specifically because it doesn't mess with indexing), If reservedFilename, replace the entire filename with "wrongFileName" (in this case, the admin must name it correctly manually)
The problem with this solution is that it's more complicated, as now the container will require write permission to replace names automatically in the configured '/files' folder.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    🎛️ serverThere are things to do on the server🔧 featureNew feature or request

    Type

    No type

    Projects

    Status

    ✅ Closed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions