Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Improve error message when an add-on contains a bad file/folder name #2043
Currently when the add-ons server rejects an add-on due to having an invalid character in a folder or file name, all it returns is:
Since it knows that the file name has one of those invalid characters, the error message should also tell what those files are, rather than just leaving the user to hunt them down themselves. As an example, fmac's add-on Era of Second Chances encountered this issue, and as a result it was required to search though all 801 files to find only a few that had a whitespace in the file name(download).
Server implementation doesn't have to hunt all filenames down though, it could reject the add-on after finding first non-conforming file name. Do you think it would be OK if it does that and outputs only first bad file name?
Does the server message mean that all other characters such as control \1 to \037 are allowed in filenames?
A side note: It's not that hard to search for filenames, anyway.
A Windows user can install cygwin or apply CMD and type something like:
Thought this version wont work from default userdata path name, since it contains space.
This version takes it into account and checks only last path name component:
A command like that will scan all installed add-ons for incorrect filenames. It will also notice names having unicode characters outside of ASCII. It could be done to report only characters which Wesnoth addon server actually rejects, if necessary, but it is good practice to avoid special characters in resource names. Of course path should be replaced with path you want to check or simply omitted if you
Users of newer versions of Windows can use PowerShell:
A file manager with search capabilities can also be used.
For example, in Windows Explorer you could type something like