Skip to content

Directory.CreateDirectory($@"C: \Users\{ username}\") creates a folder name with pure whitespaces #38584

@lifengl

Description

@lifengl

It is reported by a customer when there is a typo in the code. Running the code would create a folder inside the current running dictionary in C: with pure whitespace characters, which doesn't work with Windows explorer and other tools.

This is different from the behavior of the code in NET Framework. Although this might be a valid name in NTFS, not sure whether it is an expected behavior here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions