Repository: vscode
Issue: Deleting a folder ending in a dot, actually deletes a different folder
Labels: bug,file-explorer,windows,confirmation-pending


Type: <b>Bug</b>

I accidentally created a folder ending with a dot, say `src/app/folder.`, when the directory `src/app/folder` (without a trailing dot) also existed. The folder ending with a dot was an accident, so I tried to delete it. However, when deleting the folder `src/app/folder.` in the GUI, VSCode actually deletes the different folder `src/app/folder`!

While other software (Including Microsoft Windows Explorer) also have trouble deleting folders ending with dots, I think it is good if VSCode also takes this into account.

Despite a folder ending in a dot being a possible illegal path, the fact that these folders can be created and can exist, I think that VSCode should check for these situations to prevent deleting a different folder from the one selected. For me it caused me to lose some uncommitted progress.

In this case, how the folder was created does not matter for the issue VSCode is having, but you can read more about that on [the Issue I created for Angular-CLI](https://github.com/angular/angular-cli/issues/29275).

I hope this helps!

VS Code version: Code 1.96.2 (fabdb6a30b49f79a7aba0f2ad9df9b399473380f, 2024-12-19T10:22:47.216Z)
OS version: Windows_NT x64 10.0.19045
Modes:

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz (8 x 2611)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: enabled_on<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>skia_graphite: disabled_off<br>video_decode: enabled<br>video_encode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: enabled<br>webnn: disabled_off|
|Load (avg)|undefined|
|Memory (System)|15.84GB (1.12GB free)|
|Process Argv|--crash-reporter-id 002b88b2-788f-4c4e-83e7-25653b04045e|
|Screen Reader|no|
|VM|0%|
</details><details><summary>Extensions (35)</summary>

Extension|Author (truncated)|Version
---|---|---
ng-template|Ang|19.0.3
vscode-tailwindcss|bra|0.12.17
EditorConfig|Edi|0.16.4
prettier-vscode|esb|11.0.0
codespaces|Git|1.17.3
copilot|Git|1.255.0
copilot-chat|Git|0.23.2
rainbow-csv|mec|3.13.0
git-graph|mhu|1.30.0
folderformatter|mic|0.0.1
azure-pipelines|ms-|1.249.0
azure-dev|ms-|0.8.4
vscode-azureappservice|ms-|0.25.4
vscode-azurecontainerapps|ms-|0.7.1
vscode-azurefunctions|ms-|1.16.1
vscode-azureresourcegroups|ms-|0.10.1
vscode-azurestaticwebapps|ms-|0.12.2
vscode-azurestorage|ms-|0.16.1
vscode-azurevirtualmachines|ms-|0.6.6
vscode-cosmosdb|ms-|0.24.1
csharp|ms-|2.55.29
vscode-dotnet-runtime|ms-|2.2.3
debugpy|ms-|2024.14.0
python|ms-|2024.22.2
vscode-pylance|ms-|2024.12.1
azure-account|ms-|0.12.0
powershell|ms-|2024.4.0
vscode-node-azure-pack|ms-|1.2.0
vscode-serial-monitor|ms-|0.13.1
vscode-speech|ms-|0.12.1
vsliveshare|ms-|1.0.5948
vscode-yaml|red|1.15.0
sonarlint-vscode|Son|4.14.1
gitblame|wad|11.1.1
markdown-all-in-one|yzh|3.6.2


</details><details>
<summary>A/B Experiments</summary>

```
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
vscaac:30438847
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythonnoceb:30805159
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
dvdeprecation:31068756
dwnewjupytercf:31046870
nativerepl2:31139839
pythonrstrctxt:31112756
nativeloc1:31192215
cf971741:31144450
iacca1:31171482
notype1cf:31157160
5fd0e150:31155592
dwcopilot:31170013
stablechunks:31184530
6074i472:31201624

```

</details>

<!-- generated by issue reporter -->