Problem description:
Cannot create files with forward slashes
Expected behavior:
When I create a file with forward slashes, it should create the folders respecting the text inside of the slashes, then the file inside of the folder(s)
Actual behavior:
Steps to reproduce:
Do what I did
Bug appears at this link:
Workspace
Browser: Firefox Nightly 118.0a1 (2023-08-19) (64-bit)
OS: Windows 11 22H2
Device (Android, iOS, n/a leave blank): PC
Plan (Free, Hacker, Pro Plan): Hacker
Well, creating files with slashes in the name isn’t the point of the post, it’s explaining if I had a was creating a file called /folder1/folder2/+page.svelte it would create the +page.svelte file in the /folder1/folder2 directory. For example, editors like http://code.visualstudio.com have.
It doesn’t classify as a bug imo it was obviously intentional that the “File names cannot include forward slashes” message showed up. Bugs are when something unexpected happens, and, well, Idk Replit’s source code, but it is probably expected that message showed up.
Files cannot have forward slashes on Windows or Linux (or probably any OS) because forward slashes are often used to navigate directories and filepaths. Creating this feature would mean Replit would have to change the slash to something else before storing it on their Linux server, then convert that character back into a slash before displaying in the editor. There is a unicode character which looks like a slash but is not and that works, but you can’t type that from a keyboard so that wouldn’t be a practical solution.
This does not mean creating files with slashes in the name, but creating folders if there are slashes in the name of the file being created. For example: when creating the static/style.css file, the static folder was created, and the style.css file was created in it.
Well they’re not supposed to. This feature request is so when you create a file static/style.css it should create the static directory and put the style.css file inside of it.