add file by template ignores filename entered
Summary
When creating a new file in Web IDE, if I select a template type then it ignores the filename I'v given for the new file, and tried to create it using the template type as the filename. If I already have this file in existence then it gives me an error.
Steps to reproduce
- Go to project that already has a LICENSE file (for example)
- Go to Web IDE
- Click to create a new file
- Type in filename (eg. foo)
- Click on template type matching file you already have (eg. LICENSE)
- Notice error says the name "LICENSE" is already taken.
Example Project
Any project with files with filenames matching the file template types
What is the current bug behavior?
GitLab uses the file template type as the name and errors if there is already a file with matching name.
What is the expected correct behavior?
GitLab should create the new file using the user provided new filename, and the template contents that where selected.
Relevant logs and/or screenshots
{{https://media.giphy.com/media/kswq8LZM6l6xUtppOQ/giphy.gif}}
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
I installed using the latest GitLab CN Helm chart. Not sure how to get this info from that installation.
Here's at least the version number: GitLab Enterprise Edition 11.3.2-ee 2a103167
Results of GitLab application Check
I installed using the latest GitLab CN Helm chart. Not sure how to get this info from that installation.
Possible fixes
N/A