Skip to content

Sanity check file names before writing to disk #1579

@DerTolleEmil

Description

@DerTolleEmil

I just manged to save a file with the filename "cd.." because I wanted to go to the upper folder and mistakenly typed the "cd" as well instead of just ".." in the file save dialog. The file was in fact created but Windows is not too fond of that name. The file is pretty much unusable outside of VSCode.

After investigating further it looks like trailing dots are not getting removed when saving a file. Other programs either remove all the dots or add an extra file extension. VSCode doesn't and typos prove to be quite problematic that way :)

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugfile-explorerExplorer widget issuesverifiedVerification succeeded

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions