Windows: installing Asset Library Project or Demo whose name contain a colon will setup invalid folder name #77127
Description
Godot version
v4.0.2.stable.official [7a0977c]
System information
Windows 10
Issue description
If you try to install a project or demo from the Asset Library Projects tab in the Godot launcher popup, and the name contains a colon such as:
Movement 2: A sequel to 2D Platformer demos
https://godotengine.org/asset-library/asset/1830
The Project Name will keep the colon, and clicking Create Folder will fail with error:
Couldn't create folder.
While this is technically correct, a user not familiar with Windows limitations will be confused. I also expect the default name to work out of the box. There I report this in bug rather than proposals.
I see a few solutions:
a. Upstream conversion: immediately convert project name invalid characters to valid ones (e.g. :
-> -
) when filling Project Name. Advantage: fixes all further steps. Disadvantage: that also affects the Project Name string, which doesn't have such limitations itself.
b. Explanation: if the folder name is invalid for the current platform, explain why in the error message (should not contain invalid character ":', "/", etc.). Advantage: user learns something. Disadvantage: they must still fix the issue themselves, either changing the Project Name (which leads to disadvantage of a.) or clicking Browse > Manually create folder with name containing valid characters and select it, which takes more steps and defeats the convenience of the Create Folder button)
c. Downstream conversion: when creating a folder, convert invalid characters to valid ones as needed for the current platform, but only for the created folder. Project Name remains untouched. Advantage: preserves Project Name. Disadvantage: things done under the hood, user may not understand why colon suddenly became hyphen... But I don't think that's a big deal, since many apps do this already, such as github turning your project name spaces into hyphen so you get a standardized repo name/URL.
We also need to decide how to convert things. Should :
become empty (just remove it), hyphen -
(that will create an ugly Title- Subtitle
with no space before the hyphen, space with hyphen -
, etc. ?
Steps to reproduce
- Open Godot launcher
- Select Asset Library Projects
- Search "Movement 2"
- Download Movement 2: A sequel to 2D Platformer demos
- Create Folder
Minimal reproduction project
N/A
Activity