microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.08k stars 29.21k forks source link

The "name" is not valid as a file or folder name #161701

Closed vitorolopes closed 2 years ago

vitorolopes commented 2 years ago

Type: Bug

Everytime I try to create a file whenever I type the "." before file extension the following message pops up: The "name" is not valid as a file or folder name. Please choose a different name.

When I try to create a folder that error message does not pop up but the folder is not created.

VS Code version: Code 1.71.2 (74b1f979648cc44d385a2286793c226e611f59e7, 2022-09-14T21:03:37.738Z) OS version: Windows_NT x64 10.0.19044 Modes: Sandboxed: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-4910MQ CPU @ 2.90GHz (8 x 2893)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: unavailable_off
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|undefined| |Memory (System)|15.88GB (7.10GB free)| |Process Argv|--folder-uri file:///d%3A/WebDev/IH/Z_LandingJobs/Technical%20Interview%20Preparation/DataStructures%26Algorithms --crash-reporter-id 93569884-5410-409b-8586-77f2097226b6| |Screen Reader|no| |VM|0%|
Extensions (19) Extension|Author (truncated)|Version ---|---|--- better-comments|aar|3.0.2 expressjs|ama|2.0.0 npm-intellisense|chr|1.4.2 path-intellisense|chr|2.8.1 vscode-eslint|dba|2.2.6 javascript-ejs-support|Dig|1.3.1 es7-react-js-snippets|dsz|4.4.3 vscode-npm-script|eg2|0.3.28 prettier-vscode|esb|9.9.0 file-icons|fil|1.0.29 auto-rename-tag|for|0.1.10 code-runner|for|0.11.8 beautify|Hoo|1.5.0 vscode-language-babel|mgm|0.0.36 remote-wsl|ms-|0.66.3 vscode-print|pdc|0.9.31 LiveServer|rit|5.7.9 open-in-browser|tec|2.0.0 JavaScriptSnippets|xab|1.8.0
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vstes627:30244334 vslsvsres303:30308271 pythonvspyl392:30443607 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscoreces:30445986 pythondataviewer:30285071 vscod805cf:30301675 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30557514 vsaa593cf:30376535 pythonvs932:30410667 cppdebug:30492333 vscaat:30438848 vsclangdf:30486550 c4g48928:30535728 hb751961:30553087 dsvsc012:30540252 azure-dev_surveyonecf:30548226 2144e591:30553903 fc301958:30573243 ```
gjsjohnmurray commented 2 years ago

If you use Windows Explorer to create or rename a file and enter a name ending with '.', that character is ignored.

I think the message VS Code displays under the file-rename field is intentional. You should either omit the dot or follow it with some more characters.

I also get that message when creating or renaming a folder if II end the name with a dot.

lramos15 commented 2 years ago

\duplicate #149707