Installer silently deletes pre-existing files in the selected destination folder (files not moved to Recycle Bin)
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
Type: Bug
Steps to Reproduce:
1. Downloaded VS Code from the official download page (code.visualstudio.com/thank-you?dv=win&build=stable&v2=true)
2. Ran the installer and specified an existing, non-empty folder as the install destination. This folder contained my personal files unrelated to VS Code.
3. Clicked Install and let the installation complete normally.
Expected behavior:
Pre-existing files in the destination folder should not be deleted. The installer should either warn that the folder is not empty, or simply install its own files alongside the existing ones without touching them.
Actual behavior:
After installation finished, every pre-existing file in that folder was gone. Only VS Code's own installed files (Code.exe, unins000.exe/dat, bin folder, etc.) remained. The deleted files did NOT appear in the Windows Recycle Bin, meaning they were removed in a way that bypassed the normal shell delete operation.
I was able to recover most of the lost files using Windows "Previous Versions" (Volume Shadow Copy), but anything modified after that snapshot was permanently lost.
This seems like a serious data-loss risk for any user who accidentally points the installer at a non-empty folder.
VS Code version: Code 1.134.0 (110a328ea54b42367b803ec53ee0bf52ef26b419, 2026-08-18T18:24:44Z)
OS version: Windows_NT x64 10.0.26200
Modes:
System Info
|Item|Value|
|---|---|
|CPUs|11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz (8 x 2419)|
|GPU Status|2d_canvas: enabled
GPU0: VENDOR= 0x8086, DEVICE=0x9a49 [Intel(R) Iris(R) Xe Graphics], DRIVER_VENDOR=Intel, DRIVER_VERSION=32.0.101.6874 *ACTIVE*
GPU1: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.26100.8972
Machine model name:
Machine model version:
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_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgpu: enabled
webnn: disabled_off|
|Load (avg)|undefined|
|Memory (System)|7.68GB (0.63GB free)|
|Process Argv|--crash-reporter-id 59c59ca1-37ea-4da4-b79c-4f732e887a2b|
|Screen Reader|no|
|VM|0%|
Extensions (9)
Name|Identifier|Author|Version
---|---|---|---
Tailwind CSS IntelliSense|bradlc.vscode-tailwindcss|bradlc|0.16.0
Path Intellisense|christian-kohler.path-intellisense|christian-kohler|2.10.0
ESLint|dbaeumer.vscode-eslint|dbaeumer|3.0.34
ES7+ React/Redux/React-Native snippets|dsznajder.es7-react-js-snippets|dsznajder|4.4.3
Prettier - Code formatter|esbenp.prettier-vscode|esbenp|12.4.0
TypeScript Importer|pmneo.tsimporter|pmneo|2.0.1
Live Server|ritwickdey.liveserver|ritwickdey|5.7.10
React Typescript Toolbox|svenliebig.react-typescript-toolbox|svenliebig|1.7.0
Error Lens|usernamehw.errorlens|usernamehw|3.28.0
A/B Experiments
```
vsliv368cf:30146710
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
envsactivate1:31551504
cloudbuttont:31379625
3efgi100_wstrepl:31403338
55ia6109:31457054
ddidtcf:31399634
ec5jj548:31422691
cp_cls_t_966_ss:31526232
4je02754:31466945
8hhj4413:31478653
cp_cls_t_1081:31454832
conptydll_true:31498968
e9c30283:31461165
test_treatment2:31471001
c9b86496:31447327
capico_axe_098a3278:31555651
ei9d7968:31496641
chat:31457767
8hig5102:31480529
89g7j272:31518289
i2gc6536:31499202
52612955:31516516
ghj88844:31499326
23c7c724:31520045
ddid_c:31478207
hmra_i5g22:31518061
7df3h592:31512476
cp_cls_t_1082:31535311
logging_enabled_new:31498466
db5d2638:31499441
jb_cp_cls_t_632:31543129
56dj4588:31512888
32d76977:31512328
ha629193:31508444
a1ije391_t:31540920
jbcp_cls_pctr_t:31531130
61138546:31518536
cp_intellij_t_nes:31548657
d7b18187:31526828
ahp-both-windows:31556933
session_8:31532895
ihg5j128:31534457
f412h606:31551416
7g2b5551:31542111
nes-ex-cf-euporie-03:31542868
enable_editor_pane_layout:31569726
allow-none:31555437
6i51c363:31551401
ac562147:31564510
c7c27ce7:31554789
1h923230:31564177
1532g621_copy:31554320
treatment-23-1:31555779
unuse_dynamic_mcp:31555281
0d8dfbc3:31570291
nemo-v2:31565334
0c1h4866:31566224
session-archive:31558132
5b8j3302:31564601
mangle-name-control:31572633
permission_prompt_treatment:1332566
ccr_pr_nudge_auto_review:1319472
vsc_wsm_c:1340633
```
Contributor guide
Assessment
This issue has not been assessed yet.