Closed as not planned
Description
Does this issue occur when all extensions are disabled?
Yes
VS Code Version
Version: 1.99.3 Commit: 17baf841131aa23349f217ca7c570c76ee87b957 Date: 2025-04-15T23:18:46.076Z Electron: 34.3.2 ElectronBuildId: 11161073 Chromium: 132.0.6834.210 Node.js: 20.18.3 V8: 13.2.152.41-electron.0 OS: Linux x64 6.14.4-300.fc42.x86_64
It's code-1.99.3-1744761644.el8.x86_64
:
-
#!/usr/bin/env sh dnf5 --refresh info 'code'
-
Name : code Epoch : 0 Version : 1.99.3 Release : 1744761644.el8 Architecture : x86_64 Installed size : 400.4 MiB Source : code-1.99.3-1744761644.el8.src.rpm From repository : <unknown> Vendor : Microsoft Corporation
OS Version
-
#!/usr/bin/env pwsh #Requires -PSEdition Core Get-Content -LiteralPath '/etc/os-release' | Select-String -SimpleMatch 'CPE_NAME'
-
CPE_NAME="cpe:/o:fedoraproject:fedora:42"
Steps to Reproduce
Type.Screencast.Date.+20250430T230156+0100.webm
-
Configure the OS & DE to match my
kinfo
output (which should be the default state of the Fedora Workstation's KDE Spin):KDE Plasma Version: 6.3.4 KDE Frameworks Version: 6.13.0 Qt Version: 6.9.0 Kernel Version: 6.14.4-300.fc42.x86_64 (64-bit) Graphics Platform: Wayland
-
#!/usr/bin/env sh touch '/home/file.txt' && \ sudo chown root:root '/home/file.txt'
-
kwrite
KWrite understands that the file contains content:
If authentication fails, it states so:
"org.freedesktop.DBus.Error.AccessDenied" "" "org.freedesktop.DBus.Error.AccessDenied" "" kf.kio.workers.file: readData() returned -1 kf.kio.core: Connection::send() called with connection not invited
-
code
VSC considers the file to be empty:
If I attempt to close the file, it prompts me to save it:
If I do so, VSC considers the file content to be overwritten:
However, it merely reprompts me when I attempt to close the tab again.
This behaviour repeats even when I merely supply a path, though.1
Solution
-
Always prompt for superuser elevation when necessary.
-
Throw a (user-comprehensible) exception when an unsupported URI is provided as the location parameter's argument.
Permissions
-
admin:///home/test.txt
stat admin:///home/test.txt File: admin:///home/test.txt Size: 0 Blocks: 0 IO Block: 4096 regular empty file Device: 0,45 Inode: 6819027 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 1000/RokeJulianLockhart) Gid: ( 1000/RokeJulianLockhart) Context: unconfined_u:object_r:user_home_t:s0 Access: 2025-04-30 23:21:04.171264682 +0100 Modify: 2025-04-30 23:20:56.111128774 +0100 Change: 2025-04-30 23:20:56.111128774 +0100 Birth: 2025-04-30 23:20:43.068908859 +0100
-
/home/test.txt
stat /home/test.txt File: /home/test.txt Size: 16 Blocks: 8 IO Block: 4096 regular file Device: 0,45 Inode: 6819414 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Context: system_u:object_r:home_root_t:s0 Access: 2025-04-30 23:35:30.127866527 +0100 Modify: 2025-04-30 23:23:02.473703946 +0100 Change: 2025-04-30 23:38:32.925949552 +0100 Birth: 2025-04-30 23:23:02.473259465 +0100
-
admin:///home/
stat admin:///home/ File: admin:///home/ Size: 16 Blocks: 0 IO Block: 4096 directory Device: 0,45 Inode: 6819026 Links: 1 Access: (0755/drwxr-xr-x) Uid: ( 1000/RokeJulianLockhart) Gid: ( 1000/RokeJulianLockhart) Context: unconfined_u:object_r:user_home_t:s0 Access: 2025-04-30 23:20:44.166927373 +0100 Modify: 2025-04-30 23:20:43.068908859 +0100 Change: 2025-04-30 23:20:43.068908859 +0100 Birth: 2025-04-30 23:20:43.068908859 +0100
-
/home/
stat /home/ File: /home/ Size: 78 Blocks: 0 IO Block: 4096 directory Device: 0,45 Inode: 256 Links: 1 Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root) Context: system_u:object_r:home_root_t:s0 Access: 2025-04-30 23:38:32.954950041 +0100 Modify: 2025-04-30 23:38:32.925949552 +0100 Change: 2025-04-30 23:38:32.925949552 +0100 Birth: 2025-03-09 14:50:28.432002762 +0000