this post was submitted on 01 Nov 2024
65 points (77.3% liked)

Linuxsucks

209 readers
111 users here now

Rules:

  1. FOSS advocates and Linux evangelists aren't welcome. -We ask that you block us.
  2. Moderation is heavy handed. Try to stay on topic (that is LINUXSUCKS!).
  3. No Complaining Mute the sub if users, content, or rules bother you *it's ok to report rule violations

founded 2 months ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 10 points 1 month ago (2 children)

Same shit happens with notepad in windows when editing the hosts file.

[–] [email protected] 3 points 1 month ago (1 children)

Notepad++ handles this gracefully

It offers to relaunch itself elevated without losing what you just edited.

[–] [email protected] 1 points 1 month ago

And vim lets you elevate from inside it also.
This isn't an OS issue at all.

[–] madthumbs -3 points 1 month ago* (last edited 1 month ago) (2 children)

You're right, some AI chat told me it wouldn't even open (by default). But at least it has a decent suggested solution in the error.

[–] theunknownmuncher 2 points 1 month ago

Kudos for being willing to try it and see!

One very minor detail to note, in your test you weren't actually overwriting the original file that you opened, but instead Notepad appended a .txt to the filename, which is its default behavior, but you still got the same type or error because you didn't have write permission for any file in that directory.

[–] [email protected] 1 points 1 month ago

It's so stupid that it can't bring open an UAC prompt instead. Come on Windows you have a standardized way to elevate! Why don't you use it?